View Issue Details

IDProjectCategoryView StatusLast Update
0010490mantisbtdb oraclepublic2015-03-16 19:27
Reportermsierszen Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.7 
Fixed in Version1.3.0-beta.1 
Summary0010490: Some queries don't work due to the use of "AS" in table alias
Description

Solution:
Get rid of all "AS" after "FROM" in "SELECT ..." statements.

diff -rupN mantisbt-1.1.7/core/adodb/drivers/adodb-oci8.inc.php mantisbt-1.1.7_zce/core/adodb/drivers/adodb-oci8.inc.php
--- mantisbt-1.1.7/core/adodb/drivers/adodb-oci8.inc.php 2009-04-20 09:14:00.000000000 +0200
+++ mantisbt-1.1.7_zce/core/adodb/drivers/adodb-oci8.inc.php 2009-05-13 11:24:18.163250000 +0200
@@ -977,6 +987,13 @@ NATSOFT.DOMAIN =
*/
function _query($sql,$inputarr)
{

  • // remove 'as' after 'from'
  • while ($sql != preg_replace('/(.\bfrom\b.?)\bas\b(.*)/is', '$1 $2', $sql)) {
  • $sql = preg_replace('/(.\bfrom\b.?)\bas\b(.*)/is', '$1 $2', $sql);
  • }
  • if (is_array($sql)) { // is prepared sql
        $stmt = $sql[1];

I think I have seen a similar solution somewhere around (here?). But I can't find it anymore.

Tagsoracle

Relationships

child of 0013227 closeddregad Oracle DB support multiple issues 

Activities

grangeway

grangeway

2009-07-25 19:40

reporter   ~0022553

Hello,

This issue is fixed in git with the following commit:

http://git.mantisforge.org/w/mantisbt.git?a=commitdiff;h=66e037f9dc995f59a9d895251bfd77776b791e10

Thanks
Paul

grangeway

grangeway

2014-05-16 15:01

reporter   ~0040493

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
Paul