Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b5

Bug #16741 Manager::listTableIndexes and listTableContraints should check NULL or 0
Submitted: 2009-10-26 16:16 UTC
From: nilya Assigned: quipo
Status: Closed Package: MDB2_Driver_ibase (version CVS)
PHP Version: 5.2.5 OS: Any
Roadmaps: (Not assigned)    
Subscription  


 [2009-10-26 16:16 UTC] nilya (Ilya Nazarov)
Description: ------------ As stated here: http://www.alberton.info/firebird_sql_meta_info.html (see comment "Lorenzo Alberton, 03 October 2009 19:17"), there are need to check RDB$UNIQUE_FLAG for NULL or 0. Test script: --------------- /* SQL: CREATE TABLE TABLE2 ( ID INTEGER NOT NULL, DATEDATE TIMESTAMP ); ALTER TABLE TABLE2 ADD CONSTRAINT PK_TABLE2 PRIMARY KEY (ID); CREATE INDEX IDX_TABLE2_DATE ON TABLE2 (DATEDATE); */ require_once "MDB2.php"; $db =& MDB2::connect('ibase(firebird)://SYSDBA:masterkey@db/test'); $db->loadModule('Manager'); var_dump($db->listTableIndexes('table2')); var_dump($db->listTableConstraints('table2')); Expected result: ---------------- array(1) { [0]=> string(15) "idx_table2_date" } array(1) { [0]=> string(9) "pk_table2" } Actual result: -------------- array(0) { } array(2) { [0]=> string(9) "pk_table2" [1]=> string(15) "idx_table2_date" } (depends on Firebird version)

Comments

 [2009-10-26 16:18 UTC] nilya (Ilya Nazarov)
 [2009-12-26 18:58 UTC] quipo (Lorenzo Alberton)
-Status: Open +Status: Closed -Assigned To: +Assigned To: quipo
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.