MantisBT

View Issue Details Jump to Notes ] Wiki ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013438mantisbtdb oraclepublic2011-10-24 08:502014-05-16 15:01
Reporterdregad 
Assigned Todregad 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.2.9 
Target Version1.3.xFixed in Version1.3.x 
Summary0013438: adodb: Fatal error: Call to a member function FetchRow() on a non-object
DescriptionWhen generating the SQL script for Oracle DB, the following error occurs

Fatal error: Call to a member function FetchRow() on a non-object in /xxx/mantisbt/library/adodb/drivers/adodb-oci8.inc.php on line 368

Call Stack:
    0.0018 574752 1. {main}() /xxx/mantisbt/admin/install.php:0
    0.3886 12819936 2. call_user_func_array() /xxx/mantisbt/admin/install.php:719
    0.3886 12820252 3. db_index_exists() /xxx/mantisbt/admin/install.php:719
    0.3888 12820296 4. ADODB_oci8->MetaIndexes() /xxx/mantisbt/core/database_api.php:645
Steps To ReproduceFresh install of Mantis, run install.php
In options, set
- DB=Oracle (settings as appropriate)
- Check "Print SQL Queries instead of Writing to the Database"
Additional InformationI believe this is due to an error in ADOdb, which does not cover the case where no constraints are defined for an index.

        // get Primary index
        $primary_key = '';

        $false = false;
        $rs = $this->Execute(sprintf("SELECT * FROM ALL_CONSTRAINTS WHERE UPPER(TABLE_NAME)='%s' 
AND CONSTRAINT_TYPE='P'",$table));
// ==> FAILS HERE IF QUERY RETURNS NO DATA ($rs == false)
        if ($row = $rs->FetchRow())
           $primary_key = $row[1]; //constraint_name


Tagspatch
Attached Filespatch file icon adodb-fix-13438.patch [^] (630 bytes) 2011-10-24 08:54 [Show Content]

- Relationships
child of 0013433resolveddregad mantisbt Error ORA-00904: "PROTECTED": invalid identifier for the query 
child of 0007644resolveddregad mantisbt Problems when creating the Mantis database schema on Oracle 
child of 0013713resolveddregad mantisbt Upgrade ADOdb library to latest version 
child of 0017202assignedgrangeway Track DBAL replacement Problems when creating the Mantis database schema on Oracle 
child of 0017206assignedgrangeway Track DBAL replacement Error ORA-00904: "PROTECTED": invalid identifier for the query 

-  Notes
User avatar (0030044)
dregad (developer)
2011-10-24 08:55

Upstream bug report http://phplens.com/lens/lensforum/msgs.php?id=19001 [^]
User avatar (0030070)
dregad (developer)
2011-10-25 13:24

This patch is included in the latest version of oracle branch, see https://github.com/dregad/mantisbt/commit/515d381cc708199ca369c4ba9266ea3dc9aab5a7 [^]
User avatar (0030086)
dregad (developer)
2011-10-27 10:09

Feedback from upstream:

Topic: Re:oci8 MetaIndex function
author: John Lim created: 27-10-2011 02:19:01 AM
Looks good. Thanks i will add it to the next version of adodb.
User avatar (0031569)
dregad (developer)
2012-03-30 04:09

2 releases of adodb have gone by, but the author still has not included the patch.
User avatar (0031833)
dregad (developer)
2012-05-14 11:19

Received an e-mail from John Lim (adodb author) who said this fix will be included in 5.17
User avatar (0031902)
dregad (developer)
2012-05-25 06:54

Bug has been fixed upstream in AdoDB version 5.17.

- Related Changesets
MantisBT: master 8792ee55
Timestamp: 2011-10-24 11:41:22
Author: dregad
Details ] Diff ]
DB ADOdb MetaIndex fails when no constraints exist

Working with Oracle database (oci8), when MetaIndex() method is called
to retrieve the list of indexes for a table that has no constraints
set, an error is triggered:
Fatal error: Call to a member function FetchRow() on a non-object

This commit adds a check to cleanly exit the function, returning false.

Similar error handling has also been added to the calling database_api
function db_index_exists()

This allows the DB installation (schema.php) to proceed without errors.

Fixes 0013438

Porting to 1.3 - Conflicts:
    library/adodb/drivers/adodb-oci8.inc.php

Note: the fix to ADOdb driver does not need to be ported as it was
included in a later release of the library.
mod - core/database_api.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2011-10-24 08:50 dregad New Issue
2011-10-24 08:54 dregad File Added: adodb-fix-13438.patch
2011-10-24 08:54 dregad Tag Attached: patch
2011-10-24 08:55 dregad Note Added: 0030044
2011-10-24 08:56 dregad Relationship added child of 0013433
2011-10-24 08:56 dregad Relationship added child of 0007644
2011-10-25 13:24 dregad Note Added: 0030070
2011-10-25 13:24 dregad Assigned To => dregad
2011-10-25 13:24 dregad Status new => confirmed
2011-10-27 10:09 dregad Note Added: 0030086
2012-03-30 04:09 dregad Note Added: 0031569
2012-05-14 11:19 dregad Note Added: 0031833
2012-05-25 06:54 dregad Note Added: 0031902
2012-05-25 06:58 dregad Relationship added related to 0013713
2012-05-25 07:01 dregad Relationship replaced child of 0013713
2013-10-17 12:08 dregad Changeset attached => MantisBT master 8792ee55
2013-10-17 12:08 dregad Status confirmed => resolved
2013-10-17 12:08 dregad Resolution open => fixed
2013-10-17 12:08 dregad Fixed in Version => 1.3.x
2013-10-17 12:54 dregad Target Version => 1.3.x
2014-04-12 19:39 grangeway Issue cloned: 0017192
2014-05-16 15:01 grangeway Note Added: 0040465
2014-05-23 09:39 atrol Note Deleted: 0040465


MantisBT 1.2.17 [^]
Copyright © 2000 - 2014 MantisBT Team
Time: 0.1219 seconds.
memory usage: 3,088 KB
Powered by Mantis Bugtracker