Bug #46467 Fixing the catalog/model changed column types
Submitted: 30 Jul 2009 7:37 Modified: 15 Oct 2009 9:18
Reporter: Karsten Wutzke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.2alpha OS:Any
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: Catalog, fixing, model, types changed

[30 Jul 2009 7:37] Karsten Wutzke
Description:
I've recently installed Workbench 5.2.2alpha and opened a model. A dialog popped up saying it repaired some invalid/broken foreign key definitions. The program was right, there was something broken.

However, after backup up as *.mwb.beforefix file the new model contained *CHANGED* types! All my INTEGERs became INTEGER(11), some BOOLEANs became BOOLEAN(1)... I had to change the types back for nearly 60% of the columns!

There's a reason I use INTEGER and not INTEGER(n).

How to repeat:
Well it's hard to repeat, as you need a broken model. I'll reinstall 5.2.1alpha and attach a broken model.

Suggested fix:
Leave all column types *as is*.
[30 Jul 2009 8:51] Karsten Wutzke
BTW: If that error dialog box wasn't wider than the splash it would be hidden by it. See http://bugs.mysql.com/bug.php?id=45582. Maybe you want to fix that earlier than 6.0.
[30 Jul 2009 8:58] Susanne Ebrecht
Many thanks for writing a feature request.

The problem you describe is already well known.

Unfortunately, we have to deal here with the difference between logical and physical model.

We are already on the way to find a solution here but it is not easy.
[13 Oct 2009 16:43] Johannes Taxacher
actually, this was a bug in the loading/saving routine of 5.2.1 so the columns already were saved as INTEGER(11) but never loaded properly (so 5.2.1 always displayed these columns as int instead of int(11)).
this problem was fixed in 5.2.2, so versions 5.2.2+ did load/save the values properly from/to the files.
[15 Oct 2009 9:18] Tony Bedford
An entry was added to the 5.2.3 changelog:

When a model containing invalid/broken foreign key definitions was loaded into MySQL Workbench, the errors were detected and repaired.

However, when the model was saved and reloaded it contained changed data types. All INTEGER columns were changed to INTEGER(11). Further, some BOOLEAN columns were changed to BOOLEAN(1).