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

Bug #148 Database tables not created
Submitted: 2003-10-24 02:11 UTC
From: Andrew dot Wright at csiro dot au Assigned: lsmith
Status: Closed Package: MDB
PHP Version: 4.3.1 OS: Mandrake Linux 9.1/Solaris 2.6
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 : 2 + 35 = ?

 
 [2003-10-24 02:11 UTC] Andrew dot Wright at csiro dot au
Description: ------------ MDB_manager::updateDatabase() returns true with no errors or warnings and saves the old scheme file, but no database tables are created. I have tried this on different schemes and scripts that have worked as expected for a MDB version prior to 1.1.4RC3 (probably 1.1.3). The "no table/object creation" has been observed in Oracle 8.1.7, MySQL 4.0.11a-gamma, and PostgreSQL 7.3.2. Note that <create>1</create> has been used for the latter two db systems. Reproduce code: --------------- // Error checking snipped function imsDBManager($dbtype, $dbusername, $dbpassword,$dbhost,$dbname) { $dsn = $dbtype."://".$dbusername.":".$dbpassword."@".$dbhost."/".$dbname; $manager = new MDB_manager; $success = $manager->connect($dsn); return $manager; } function imsInstallDatabase() { $schema = "dbscheme.xml"; $old_schema_ext = ".previous"; $db = imsDBManager(); $update = $db->updateDatabase($schema, $schema.$old_schema_ext); return $update } Expected result: ---------------- $db->updateDatabase($schema, $schema.$old_schema_ext); (imsInstallDatabase()) returns true. The tables and objects specified in dbscheme.xml created. Actual result: -------------- Returns true, but tables not created.

Comments

 [2003-10-24 19:03 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!
 [2003-11-13 13:36 UTC] the dot woman at bikkel dot org
FYI I'm using version 1.1.3 and tried the updateDatabase of the MDB_manager too. It is working fine for MySQL (3.23.48, shame on me) but i had the same as Andrew Wright with PostgreSQL 7.3.2. No database, no error, no warning, nothing. greetings, tijger oh, and i wanted to say "i like this abstraction layer".
 [2004-05-13 10:38 UTC] smith at backendmedia dot com
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.
 [2004-06-29 15:10 UTC] michael at mompopmedia dot com
when creating a new DB with a xml schema, MDB2_Tools_Manager::updateDatabase returns true even when the opperation failed. Specifically, if there is an error on an executed "ALTER TABLE" for indexes, the _createTable method incorrectly returns true. The error is located in this snippet (446 to 454) if (MDB2::isError($result)) { $result = $this->db->manager->dropTable($table_name); if (MDB2::isError($result)) { $result = $this->raiseError(MDB2_ERROR_MANAGER, null, null, 'could not drop the table ('.$result->getMessage(). ' ('.$result->getUserinfo().'))'); } return $result; } upon failure on the ALTER TABLE query, createTable returns true that the created table was successfully dropped. It should be returning an error notifying that the table was dropped because fo the ALTER TABLE failure.
 [2004-07-11 22:36 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!