Bug #12213 setting default value NULL while editing a table
Submitted: 27 Jul 2005 16:11 Modified: 9 Sep 2005 7:58
Reporter: Leon Benarroch Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.13 OS:Windows (Xp home)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any

[27 Jul 2005 16:11] Leon Benarroch
Description:
I have in the definition of a table, the default values of a date : "0000-00-00 00:00:00" and I want to set to NULL, this is the only change I made, but the querybrowser say : "The changes you made did not result in the need to alter the table" but I did a change , I want to set to null the default value!!!, even If I made a change to data like comment it don't make the chenge to the default values, its appear that for the wurybroser the values "0000-00-00 00:00:00" is the same than null and is not!!!

How to repeat:
just create a table with a datetime column and create with a default values "0000-00-00 00:00:00" the try to edit the table and change the default values to null
[27 Jul 2005 16:24] Leon Benarroch
I can set the default value to null in version 1.1.5
[27 Jul 2005 17:35] MySQL Verification Team
Hello,

Thank you for the report.
When you press "Apply changes" what ALTER TABLE statement does  MySQL Query Browser write in "Confirm Table Edit" window?
[27 Jul 2005 18:28] Leon Benarroch
Ok, in 1.1.5 it show:" ALTER TABLE `base`.`table1` MODIFY COLUMN `fecha` DATETIME DEFAULT null;" 

but in the 1.1.13 it don't write any information about the default value,it only write the others values that I change (example comments..)
[28 Jul 2005 8:51] MySQL Verification Team
Thanks for clarification!

Summary:
When you empty Default Value field for a datetime column and press "Apply changes" MySQL Query Browser produces "The changes you made did not result in the need to alter the table" error. 

This error doesn't appear if you do any other changes, for example add column comment.

This applies to MySQL Administrator 1.1.0 rc too.
[9 Sep 2005 7:58] Vladimir Kolesnikov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html