Description:
Make sure you quote default values of columns when needed, otherwise you export invalid SQL. If you do not want to do the quoting, make validation warn the user if a default looks error prone (because it lacks quotes).
Please note this is about WB 1.0.6 Alpha. 1.0.6 Alpha is newer than 1.1.10. You can download it from https://inside.mysql.com/wiki/MySQLWorkbenchAlphaReleases . Please note also the special and temporary handling of pre-beta bug reports.
How to repeat:
Start WB, create a table "table1":
id INT PRIMARY KEY
col1 SET('one', 'two', 'three') DEFAULT one
Make sure you do not enter any quotes in the Default input field of the table editors column tab. Create a diagram, drag the table from the Catalog on it, open the Output window, validate the model. Validation will not bail.
Export a SQL CREATE script:
CREATE TABLE IF NOT EXISTS `mydb`.`table1` (`id` INT NOT NULL , `col1` SET('one', 'two', 'three') NULL DEFAULT one , PRIMARY KEY (`id`) ) ;
And run the SQL from WB:
CREATE TABLE IF NOT EXISTS `mydb`.`table1` (`id` INT NOT NULL , `col1` SET('one', 'two', 'three') NULL DEFAULT one , PRIMARY KEY (`id`) ) ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'one , PRIMARY KEY (`id`) )' at line 1
Same game can of course be played also with ENUM() and likely other column types as well (haven't checked any other but ENUM).