View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014774 | mantisbt | db mssql | public | 2012-10-04 07:43 | 2014-09-23 18:05 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.12 | ||||
Target Version | 1.2.12 | Fixed in Version | 1.2.12 | ||
Summary | 0014774: Fix issue in tag api with odbc_mssql driver | ||||
Description | See Github pull request from bstidham | ||||
Tags | No tags attached. | ||||
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-1.2.x 32ba1160 2012-09-26 15:04 Bill Stidham Committer: Damien Regad Details Diff |
Fix issue in tag api with odbc_mssql driver This branch of code was put into place to handle a deficiency in the odbc_mssql driver that doesn't allow for bound subqueries. This is not needed for the other mssql drivers, yet using db_is_mssql() returns true for all mssql drivers so code is indiscriminately executed for other drivers. $t_params[] init was changed because it only needs to be set once. It is needed for the query in the mssql condition block for the first query only to grab the list of tags that aren't specific to this bug. Afterwards in the second query, $t_params needs to be null or it results in the database returning an error due to no '?' replacements. Therefore, after running the first query, we need to set this to null. If the condition fails and the dbtype is not mssql (or 'odbc_mssql') then $t_params is already set. Note: the multiple query setup in the "true" condition is a really bad way to do this. I'm not going to mess with it, however, since the tag count probably won't get too high in any general scenario. Fixes 0014774 Signed-off-by: Damien Regad <damien.regad@merckgroup.com> Note, this was simply checked for syntax errors and compliance with coding guidelines as I don't have access to an MSSQL setup. |
Affected Issues 0014774 |
|
mod - core/tag_api.php | Diff File | ||
MantisBT: master 756a944e 2012-09-26 15:04 Bill Stidham Committer: Damien Regad Details Diff |
Fix issue in tag api with odbc_mssql driver This branch of code was put into place to handle a deficiency in the odbc_mssql driver that doesn't allow for bound subqueries. This is not needed for the other mssql drivers, yet using db_is_mssql() returns true for all mssql drivers so code is indiscriminately executed for other drivers. $t_params[] init was changed because it only needs to be set once. It is needed for the query in the mssql condition block for the first query only to grab the list of tags that aren't specific to this bug. Afterwards in the second query, $t_params needs to be null or it results in the database returning an error due to no '?' replacements. Therefore, after running the first query, we need to set this to null. If the condition fails and the dbtype is not mssql (or 'odbc_mssql') then $t_params is already set. Note: the multiple query setup in the "true" condition is a really bad way to do this. I'm not going to mess with it, however, since the tag count probably won't get too high in any general scenario. Fixes 0014774 Signed-off-by: Damien Regad <damien.regad@merckgroup.com> Note, this was simply checked for syntax errors and compliance with coding guidelines as I don't have access to an MSSQL setup. |
Affected Issues 0014774 |
|
mod - core/tag_api.php | Diff File |