Bug #46522 workbench datetime fields default dates error
Submitted: 3 Aug 2009 8:59 Modified: 13 Nov 2009 14:23
Reporter: Ken Brown Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.16, 5.2.2 OS:Any (Ubuntu 9.04, Windows)
Assigned to: CPU Architecture:Any
Tags: regression

[3 Aug 2009 8:59] Ken Brown
Description:
when a datetime field is specified and a default value entered the system does not automatically wrap the input in quotes as in previous releases.  Consequently error when running in forward engineered script

How to repeat:
Create table
Create datetime column
add default value to datetime field
forward engineer to script
run script

Suggested fix:
add back the auto quotes to the field - if they are needed they should always be added
[3 Aug 2009 9:30] Valeriy Kravchuk
Thank you for the bug report. Verified just as described on both Ubuntu and Windows, with 5.2.2 and 5.1.16.
[13 Aug 2009 12:37] Johannes Taxacher
for 5.1 we decided to strip down the automatic quoting of default values to some simple rules.
only values for text-types are automatically quoted (except the word NULL or empty-string).
quoting of values for all other datatypes is upon the user.
[11 Sep 2009 7:22] Mike Lischke
There is nothing to fix. There are way too many special cases to consider when quoting, also based on the data type. So the user may or may not get quotes. Don't forget that we also have to handle quoting by the user himself. This entire mix leads to a very unreliable feature, which can (if at all) only be fixed with high effort. From our experience, the best is therefore to let the users quote their input, just as they have to do when they write queries.