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

Bug #6053 create sequence error and a warning
Submitted: 2005-11-24 09:23 UTC
From: alex at cgi-central dot net Assigned: lsmith
Status: Closed Package: MDB2_Schema
PHP Version: 4.3.11 OS: any
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 26 - 8 = ?

 
 [2005-11-24 09:23 UTC] alex at cgi-central dot net
Description: ------------ 1. There was a warning if array element is not exists in $changes array. It is eliminated by first change in diff. 2. alterDatabaseSequences() function passed $sequence variable to createSequence function. But in $changes array this set to "1", of course it does not look like a valid sequence definition. Fixed. Test script: --------------- +++ MDB2/Schema.php 24 Nov 2005 09:18:54 -0000 @@ -1234,6 +1234,7 @@ function verifyAlterDatabase($changes) { if (array_key_exists('tables', $changes) && is_array($changes['tables'] ) + && array_key_exists('tables', $changes['tables']) && array_key_exists('tables', $changes['tables']['change']) ) { foreach ($changes['tables']['change'] as $table_name => $table) { @@ -1445,7 +1446,7 @@ if (array_key_exists('add', $changes)) { foreach ($changes['add'] as $sequence_name => $sequence) { - $result = $this->createSequence($sequence_name, $sequence); + $result = $this->createSequence($sequence_name, $current_defini tion[$sequence_name]); if (PEAR::isError($result)) { return $result; }

Comments

 [2005-11-24 14:18 UTC] lsmith
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.