Bug #66405 Invalid default value for 'production_date'
Submitted: 15 Aug 2012 19:00 Modified: 28 Sep 2012 9:15
Reporter: Jake Ochs Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.42 OS:Windows (Microsoft Windows XP Professional Service Pack 3 (build 2600))
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[15 Aug 2012 19:00] Jake Ochs
Description:
this code in the ddl: `production_date` DATE NOT NULL DEFAULT '0000-00-00', resukts in the error Invalid default value for 'production_date'  in workbench but it runs fine on the console

----- Developer Notes -----

MySQL Workbench CE for Windows version 5.2.42  revision 9752
Configuration Directory: C:\Documents and Settings\jochs\Application Data\MySQL\Workbench
Data Directory: C:\Program Files\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)
CPU: 4x Intel(R) Core(TM) i7 CPU       M 620  @ 2.67GHz, 3.0 GiB RAM
Active video adapter (0): NVIDIA Quadro FX 880M
Installed video RAM: 1024 MB
Current video mode: 1280 x 1024 x 4294967296 colors
Used bit depth: 32
Driver version: 6.14.12.6155
Installed display drivers: nv4_disp.dll
Active video adapter (1): DameWare Development Mirror Driver
Installed video RAM: 1024 MB
Current video mode: 1280 x 1024 x 4294967296 colors
Used bit depth: 32
Driver version: 1.1.0.0
Installed display drivers: nv4_disp.dll
Current user language: English (United States)

How to repeat:
create a new table containing with a field of type DATE NOT NULL DEFAULT '0000-00-00' and run the script in workbench
[16 Aug 2012 0:38] MySQL Verification Team
I couldn't repeat on my own, please provide a script which presents that behavior. Thanks.
[23 Aug 2012 13:31] MySQL Verification Team
Please check the SQL_MODE set in WB. If it includes one of the strict modes and NO_ZERO_DATE, then this behavior is expected.
[24 Aug 2012 18:50] Jake Ochs
Scott, your answer is unclear to me: is this a WB issue or a server setting?
[26 Aug 2012 13:11] Valeriy Kravchuk
SQL_MODE is a server variable, but you can set in Workbench using Preferences > SQL Editor > Default SQL_MODE. 

If that setting in Workbench is empty (or does NOT contain NO_ZERO_DATE), then we may have a bug in Workbench here.
[27 Aug 2012 15:10] Jake Ochs
screenie of wb prefs w/o any value in DEFAULT_SQL_MODE field

Attachment: wb preferences screenie.png (image/png, text), 58.33 KiB.

[27 Aug 2012 15:11] Jake Ochs
so, accd. to your last post, Valeriy, there may be a bug in wb. The field you mention is indeed blank (see attached screenshot)
[28 Aug 2012 4:10] Alfredo Kojima
Are you modifying the table in the modeler or SQL Editor?
[29 Sep 2012 1: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".