Bug #36324 Blank default column value not persisting during synchronization.
Submitted: 24 Apr 2008 18:10 Modified: 25 May 2008 10:58
Reporter: Robert Cesaric Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.19 SE OS:Windows
Assigned to: CPU Architecture:Any
Tags: default value, null

[24 Apr 2008 18:10] Robert Cesaric
Description:
Workbench tries to insert "NULL" for default column values when you leave it blank.

This causes an error when you're using the synchronization feature on "Not Null" columns with blank default values.

How to repeat:
Create a field in a table and set it to "Not Null(NN)" and then leave the default value blank.  You then receive an error when you try to synchronize:

Error 1067: Invalid default value for 'userId'

ALTER TABLE `MyDB`.`Appraisal` CHANGE COLUMN `userId` `userId` INT(11) NOT NULL DEFAULT NULL  

SQL script execution finished: statements: 6 succeeded, 1 failed

Suggested fix:
Remove "DEFAULT NULL" from the ALTER TABLE script if the DEFAULT VALUE is empty in Workbench.
[25 Apr 2008 10:58] MySQL Verification Team
Thank you for the bug report. Could you please provide a model file project
which presents the behavior reported. Thanks in advance.
[25 May 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".