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

Bug #5930 Using notnull causes error
Submitted: 2005-11-10 19:46 UTC
From: richtl at arscognita dot com Assigned: lsmith
Status: Closed Package: MDB2
PHP Version: 5.1.0 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-11-10 19:46 UTC] richtl at arscognita dot com
Description: ------------ Compiling a schema that has "notnull" tags results in "MDB2 Error: unknown error". It works fine if I remove the <notnull> tag. Environment is MDB2 2.0.0beta6 beta MDB2_Driver_mysql 0.1.1 beta MDB2_Driver_mysqli 0.1.1 alpha MDB2_Schema 0.2.0 beta Test script: --------------- <?xml version="1.0" ?> <database> <name>testdb</name> <create>1</create> <table> <name>table1</name> <declaration> <field> <name>field1</name> <type>integer</type> <notnull>1</notnull> </field> </declaration> </table> </database> Expected result: ---------------- Schema generated successfully, field is not nullable. Actual result: -------------- Schema generates error "MDB2 Error: unknown error" and doesn't compile.

Comments

 [2005-11-10 20:52 UTC] richtl at arscognita dot com
Working through it some more. setting <notnull>1</notnull> on my first field generates an error with the following (obviously broken) SQL: CREATE TABLE Thought (thoughtId INT DEFAULT NULL NOT NULL,summary CHAR (255) DEFAULT NULL,detail TEXT DEFAULT NULL,status CHAR (16) DEFAULT NULL,interacted DATETIME DEFAULT NULL)]
 [2005-11-12 16:02 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.