Bug #38825 DEFAULT property is not being stored
Submitted: 15 Aug 2008 16:54 Modified: 14 Oct 2008 12:45
Reporter: Alex Saavedra Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.24 OS:Windows (SP3)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any

[15 Aug 2008 16:54] Alex Saavedra
Description:
If you define DEFAULT property for any field, it is not being stored. It's _very_ annoying as I've been working on a large database design, and have lost ALL default column definitions upon migrating from 5.0.23 to 5.0.24

How to repeat:
1. create table with 3 fields:
   CREATE  TABLE IF NOT EXISTS `mydb`.`table1` (
     `id` INT NOT NULL AUTO_INCREMENT ,
     `x` INT NOT NULL DEFAULT 0 ,
     `y` VARCHAR(45) NOT NULL DEFAULT 'some text',
     PRIMARY KEY (`id`) )
   ENGINE = InnoDB

2. save project as test.mwb
3. close Workbench
4. open Workbench and load recently created test.mwb

You'll see that DEFAULT properties for x, y fields are not stored.
[15 Aug 2008 20:23] Stefan Frings
I encountered the same problem. After fallback to version 5.0.23, the problem disappeared.

I also found out that version 5.0.24 saves the default values correctly but does not load them from project file.
[16 Aug 2008 12:35] Valeriy Kravchuk
Can't repeat whit with OSS edition of 5.0.24. Can you, please, check it?
[18 Aug 2008 13:11] Alex Saavedra
I reported this bug with v 5.0.24 SE (_not_ OSS)
[18 Aug 2008 14:13] Thomas de Grenier de Latour
I can confirm this issue on 5.0.24 OSS (rev. 3407) on Windows XP SP2.
The test case from comment #1 is good:
 - "Import..." a new model from the CREATE statement
 - check DEFAULT values are there in the "Columns" tab
 - save, exit
 - reopen the file
 - check DEFAULT values are gone

I have not downgraded yet, but i'm sure 5.0.23 was OK (i've seen this bug right after my upgrade to 5.0.24, on files i'm working with daily).
[19 Aug 2008 13:10] MySQL Verification Team
Thank you for the bug report.
[21 Aug 2008 12:16] MySQL Verification Team
Bug: http://bugs.mysql.com/bug.php?id=38935 has been marked as duplicate of this one.
[21 Aug 2008 13:03] Vladimir Kolesnikov
The default value is erroneously cleared on model load, so if the model file is not overwritten you will be able to correctly read the model in the fixed version of Workbench.
[21 Aug 2008 17:44] Johannes Taxacher
this issue has been fixed and will be in release 5.0.25
[14 Oct 2008 12:45] Tony Bedford
An entry was added to the 5.0.25 changelog:

If any DEFAULT properties were defined for a model, they appeared to be lost after saving the model and restarting Workbench.