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

Bug #10504 MySQL 5 and DEFAULT value for INT columns
Submitted: 2007-03-26 06:03 UTC
From: amir Assigned: davidc
Status: Closed Package: pearweb (version CVS)
PHP Version: 5.2.1 OS:
Roadmaps: 1.12.0    
Subscription  


 [2007-03-26 06:03 UTC] amir (Amir Mohammad Saied)
Description: ------------ In pearweb SQL files we've lines like: unsubscribe_date int( 11 ) default '', Seems since MySQL 5 it's not possible anymore to set NULL values for INT columns in this way as MySQL returns: #1067 - Invalid default value for 'unsubscribe_date' I'm using the MakeFile, no MDB2 or any other DBAL around then. btw. Seems the MakeFile is a bit outdated.

Comments

 [2007-03-30 02:59 UTC] cellog (Greg Beaver)
can you determine what will work?
 [2007-03-30 03:27 UTC] danielc (Daniel Convissor)
default NULL or default 0
 [2007-04-01 02:35 UTC] cellog (Greg Beaver)
David, do you have Mysql 5 to verify this? If not, unassign yourself and we'll figure out something else to do, maybe assign it to saltybeagle since he has done junk like this before :)
 [2007-04-01 03:58 UTC] davidc (David Coallier)
Without checking mysql I can assure you that mysql5 cannot set '' to integer columns. However, DEFAULT NULL, DEFAULT 0 will both work nicely. I will set them to NULL in the sql files.
 [2007-04-01 04:01 UTC] davidc (David Coallier)
Amir, could you please specify which files have this please ? Thanks, D
 [2007-04-01 08:30 UTC] amir (Amir Mohammad Saied)
Seems your latest commit fixed it, I'll play more with pearweb, if I found anything else, will post here.
 [2007-04-01 14:09 UTC] davidc (David Coallier)
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. This is now fixed in the bugs.sql. Mysql five doesn't support DEFAULT '' so right now I have set it to DEFAULT NULL, this is also supported by mysql 4.1 and 4.0 Thanks