View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011744 | mantisbt | db mssql | public | 2010-04-05 14:27 | 2014-09-23 18:05 |
Reporter | czema | Assigned To | rombert | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
OS | Windows 2003 Standard | ||||
Product Version | 1.2.0 | ||||
Target Version | 1.2.9 | Fixed in Version | 1.2.9 | ||
Summary | 0011744: Failure getting tag candidates on MSSQL | ||||
Description | When no tags have been defined, going to view.php throws the following error: Database query failed. Error received from database was 0002812: Could not find stored procedure 'NE'. for the query: SELECT id, name, description FROM mantis_tag_table WHERE id IN ( ) ORDER BY name ASC . | ||||
Steps To Reproduce | On a new installation of Mantis on MSSQL, create a new bug. View the bug. | ||||
Additional Information | The above query is generated on line 425 in /core/tag_api.php. The error results because no tags exist in the mantis_bug_tag_table. Therefore, there is no tag names are inserted into the IN function. This can be resolved by returning an empty array if the query on line 417 returns no rows. | ||||
Tags | No tags attached. | ||||
I am not a PHP programmer, but I believe adding this at line 421 will resolve the issue: if ($result.EOF) return $t_subquery_results; |
|
Your fix helped me too, I was having a similar error. I am also getting: Database query failed. Error received from database was 0000209: Ambiguous column name 'id'. for the query: SELECT DISTINCT mantis_bug_table.*, mantis_bug_table.last_updated, mantis_bug_table.date_submitted FROM mantis_project_table, mantis_bug_table WHERE mantis_project_table.enabled = ? AND mantis_project_table.id = mantis_bug_table.project_id AND ( mantis_bug_table.project_id = 1 ) ORDER BY id DESC, mantis_bug_table.last_updated DESC, mantis_bug_table.date_submitted DESC. (check the ORDER BY part) This is when I click on "View Issues", did you get that as well? |
|
I haven't received that error yet. This is a different problem altogether. A new issue should be opened for it. It is clear that the ORDER BY clause needs to be fixed. It should say "mantis_bug_table.id DESC" rather than "id DESC" |
|
My 2 cents: to really get the tags combo box fill in well: while( $row = db_fetch_array( $result ) ) {
|
|
Can you retry with latest master-1.2.x from git ? I've applied a fix for bug 0013363 which should solve this problem as well. |
|
I have tried with your patch too. |
|
Got it, thanks. Can you resubmit the pull request on github or just attach a patch? |
|
here is : i change the order for return the empty array in first ps |
|
Thanks! I started a discussion on the pull request. |
|
I closed the 18 here is the correct (last) one: |
|
Cherry-picked to 1.2.x as well. Thanks! |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT currently supports Mysql and has support for other database engines. The support for other databases is known to be problematic. Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer. If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at paul@mantisforge.org In the meantime, I'd advise running Mantis with Mysql Only to avoid issues. Thanks |
|
MantisBT: master c2a05f8c 2011-10-14 02:50
Details Diff |
Fix 0011744: Failure getting tag candidates on MSSQL make the query to get the available tags id , return the correct list |
Affected Issues 0011744 |
|
mod - core/tag_api.php | Diff File | ||
MantisBT: master-1.2.x 52ac5d2f 2011-10-14 02:50
Details Diff |
Fix 0011744: Failure getting tag candidates on MSSQL make the query to get the available tags id , return the correct list |
Affected Issues 0011744 |
|
mod - core/tag_api.php | Diff File | ||
MantisBT: master 12cf79d3 2011-10-14 03:03 Details Diff |
Merge pull request #19 from gcompagnon/patch-4 Fix 0011744: Failure getting tag candidates on MSSQL |
Affected Issues 0011744 |
|
mod - core/tag_api.php | Diff File |