Notice: this is a static mirror for historical purposes.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
166Source Integration[All Projects] Generalpublic2010-06-28 01:492010-06-28 01:49
Reportergenius_p 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary166: Error in Repositories page
DescriptionWhen Mantis DB hosted MS SQL Server.

APPLICATION ERROR #401
Запрос к базе данных не удался. Получена ошибка - #8117: SQLState: 42000
Error Code: 8117
Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Operand data type text is invalid for count operator.
, запрос: SELECT COUNT(DISTINCT filename) FROM mantis_plugin_Source_file_table AS f
JOIN mantis_plugin_Source_changeset_table AS c
ON c.id=f.change_id
WHERE c.repo_id=1.
Additional InformationFor issue fix apply patch:

--- p:/Distrs/Utilites/mantis 1.2.1/source-integration/Source/Source.API.php Чт май 6 19:56:26 2010
+++ //iserv/e$/Mantis/web/plugins/Source/Source.API.php Чт июн 17 12:27:15 2010
@@ -623,13 +623,24 @@
         $t_stats['changesets'] = db_result( db_query_bound( $t_query, array( $this->id ) ) );
 
         if ( $p_all ) {
- $t_query = "SELECT COUNT(DISTINCT filename) FROM $t_file_table AS f
+ if(db_is_mssql())
+ {
+ $t_count_text_fn = 'COUNT(*)';
+ $t_count_text_bug = 'COUNT(*)';
+ }
+ else
+ {
+ $t_count_text_fn = 'COUNT(DISTINCT filename)';
+ $t_count_text_bug = 'COUNT(DISTINCT bug_id)';
+ }
+
+ $t_query = "SELECT $t_count_text_fn FROM $t_file_table AS f
                         JOIN $t_changeset_table AS c
                         ON c.id=f.change_id
                         WHERE c.repo_id=" . db_param();
             $t_stats['files'] = db_result( db_query_bound( $t_query, array( $this->id ) ) );
 
- $t_query = "SELECT COUNT(DISTINCT bug_id) FROM $t_bug_table AS b
+ $t_query = "SELECT $t_count_text_bug FROM $t_bug_table AS b
                         JOIN $t_changeset_table AS c
                         ON c.id=b.change_id
                         WHERE c.repo_id=" . db_param();
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2010-06-28 01:49 genius_p New Issue


Copyright © 2000 - 2012 MantisBT Group
Time: 0.1026 seconds.
memory usage: 8,322 KB
Powered by Mantis Bugtracker

hosted with
Linode