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

Bug #12552 _makeAutoincrement doesn't quote the "sequence name" in "Trigger creation".
Submitted: 2007-11-29 10:48 UTC Modified: 2007-12-01 12:45 UTC
From: bajeli Assigned: quipo
Status: Closed Package: MDB2_Driver_oci8 (version 1.4.1)
PHP Version: 5.1.6 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2007-11-29 10:48 UTC] bajeli (Antonino Bajeli)
Description: ------------ Using MDB2 with options['quote_identifier' => true] the createTable containing an autoincrement column will generate e Sequence and Trigger. These are generated by "_makeAutoincrement" method of Driver/Manager/oci8.php The genaration of the trigger doesn't contain the quote in the $sequence_name as result the Trigger is invalid. I fixed in this way : In line 182 of Driver/Manager/oci8.php $sequence_name = $db->getSequenceName($table); + $sequence_name= $db->quoteIdentifier($sequence_name, true);

Comments

 [2007-11-29 11:34 UTC] bajeli (Antonino Bajeli)
I also fixed the line 152 as follow: - $table = strtoupper($table); - $index_name = $table . '_AI_PK'; + $index_name = strtoupper($table) . '_AI_PK'; otherwise the $table name is altered the "createConstraint" will raise an arror of Unkow table.
 [2007-12-01 12:45 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. 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.