| Anonymous | Login | Signup for a new account | 2012-09-13 19:33 PDT |
| Main | Blog | My View | View Issues | Change Log | Roadmap | IRC Chat | Repositories | Scrum Board |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 166 | Source Integration | [All Projects] General | public | 2010-06-28 01:49 | 2010-06-28 01:49 | ||||||
| Reporter | genius_p | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||
| Status | new | Resolution | open | ||||||||
| Product Version | |||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 166: Error in Repositories page | ||||||||||
| Description | When 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 Information | For 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(); | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
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 |