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

Bug #5977 Error in updateDatabase()/verifyAlterDatabase()
Submitted: 2005-11-16 03:24 UTC
From: richtl at arscognita dot com Assigned: lsmith
Status: Closed Package: MDB2_Schema
PHP Version: 5.1.0 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-11-16 03:24 UTC] richtl at arscognita dot com
Description: ------------ Updating a database from one schema to another generates an error with both the mysql and mysqli drivers. I am using MySQL 5.0. Test script: --------------- My test script drops any existing DB, deletes the xml.old file, creates schema1.xml successfully, and then throws an error when calling updateDatabase() on the schema2.xml. schema1.xml is: <?xml version="1.0" encoding="ISO-8859-1" ?> <database> <name><variable>database_name</variable></name> <create><variable>create_db</variable></create> <table><name>table1</name> <declaration> <field><name>field1</name> <type>integer</type> </field> <index><name>table1_field1</name> <field><name>field1</name></field> </index> </declaration> </table> </database> schema2.xml is: <?xml version="1.0" encoding="ISO-8859-1" ?> <database> <name><variable>database_name</variable></name> <create><variable>create_db</variable></create> <table><name>table1</name> <declaration> <field><name>field1</name> <type>integer</type> </field> <field><name>field2</name> <type>integer</type> </field> <index><name>table1_field1</name> <field><name>field1</name></field> </index> </declaration> </table> </database> Expected result: ---------------- Clean upgrade. Actual result: -------------- Warning: array_key_exists(): The second argument should be either an array or an object in /usr/share/pear/MDB2/Schema.php on line 1360 Call Stack: 0.0010 48512 1. {main}() /home/richtl/workspace/libmindmeld/install/makedb.php:0 0.4116 2522728 2. MDB2_Schema->updateDatabase() /home/richtl/workspace/libmindmeld/install/makedb.php:13 0.4646 2535104 3. MDB2_Schema->alterDatabase() /usr/share/pear/MDB2/Schema.php:1910 0.4673 2546200 4. MDB2_Schema->alterDatabaseTables() /usr/share/pear/MDB2/Schema.php:1478 0.4674 2546200 5. array_key_exists() /usr/share/pear/MDB2/Schema.php:1360

Comments

 [2005-11-16 11:06 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!