Bug #76596 | Loss of Default NULL value | ||
---|---|---|---|
Submitted: | 5 Apr 2015 15:54 | Modified: | 6 Apr 2015 6:42 |
Reporter: | Francimar Mazin | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Workbench: Modeling | Severity: | S3 (Non-critical) |
Version: | 6.2.5.0 build 397 (64 bits) | OS: | Windows (7 64 bits) |
Assigned to: | CPU Architecture: | Any | |
Tags: | DEFAULT, Default NULL, default value, erase default, null |
[5 Apr 2015 15:54]
Francimar Mazin
[6 Apr 2015 6:18]
MySQL Verification Team
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Quoting from manual " A PRIMARY KEY is a unique index where all key columns must be defined as NOT NULL. If they are not explicitly declared as NOT NULL, MySQL declares them so implicitly (and silently)" http://dev.mysql.com/doc/refman/5.6/en/create-table.html // see for example: mysql> CREATE TABLE IF NOT EXISTS `table1` ( `idtable1` INT NULL DEFAULT NULL, `table1col` VARCHAR(45) NULL DEFAULT 'null', PRIMARY KEY (`idtable1`)); Query OK, 0 rows affected (0.01 sec) mysql> show create table table1\G *************************** 1. row *************************** Table: table1 Create Table: CREATE TABLE `table1` ( `idtable1` int(11) NOT NULL DEFAULT '0', `table1col` varchar(45) DEFAULT 'null', PRIMARY KEY (`idtable1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec)
[6 Apr 2015 6:37]
Francimar Mazin
I want a table like this: CREATE TABLE IF NOT EXISTS `table1` ( `idtable1` INT NOT NULL, `name` VARCHAR(45) NULL DEFAULT NULL, PRIMARY KEY (`idtable1`)) ENGINE = InnoDB; but MySQL Workbench erase DEFAULT NULL from column `name` and a have this instead: CREATE TABLE IF NOT EXISTS `table1` ( `idtable1` INT NOT NULL, `name` VARCHAR(45) NULL, PRIMARY KEY (`idtable1`)) ENGINE = InnoDB; I can't use arrow keys anymore because mysql erase DEFAULT NULL when I select first `idtable1` and when i select `name` the DEFAULT NULL is erased Is erased from any other column see: http://postimg.org/image/f53cf61wr/
[6 Apr 2015 6:42]
MySQL Verification Team
Thank you for the feedback. Verified as described on Win7 with WB 6.2.5, 6.3.2. Thanks, Umesh