Bug #50006 Save does not commit active changes in editor
Submitted: 30 Dec 2009 21:21 Modified: 10 May 2010 10:14
Reporter: Shantanu Upadhyaya Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.11.OSS Beta OS:Windows
Assigned to: Alfredo Kojima CPU Architecture:Any

[30 Dec 2009 21:21] Shantanu Upadhyaya
Description:
Since the ER diagram is not saved the first time Save is clicked, data synch fails...no alter statement is generated.

How to repeat:
Followup from bug 47953 which has been fixed. I am now using MWB 5.2.11.OSS Beta.

A) How to fail synchronize - Flow 1
-----------------------------------
1. Change ACCOUNT.CITY from VARCHAR(N) to VARCHAR(M) - subst M and N.
2. Hit the save button
   - Note that file is saved, but cursor is still editing CITY column datatype.
3. Goto database --> synchronize model
	
Result :Does not synchronize model.

B) How to make synchronize work - Flow 2
----------------------------------------
1. same as 1 above
2. save as 2 above ( * is removed from filename on app title bar )
3. move the cursor away from column datatype -- (say) click on a table in the ER diagram
4. * reappears on the title bar. <-- that's a problem
5. Hit save again.
6. Go to database --> synchronize model

Result: Synch works fine.

Looks like A) is a bug. So it B) 4.

The only reason I marked it Serious is because I tend to do the steps in A) a lot...and it's irritating that MWB doesn't save the change. I have to hit save again. Otherwise, this is Non-Critical since B) is clearly a workaround.

Suggested fix:
It's not saving on first click of the save button. Something related to that I suppose.
[30 Dec 2009 21:22] Shantanu Upadhyaya
Please use the MWB file from bug 47953 . If you don't have it, let me know and I will attach it here.
[30 Dec 2009 21:27] Shantanu Upadhyaya
Why doesn't MWB create upper-case table names ? Some projects may require this as a convention/standard ? Isn't it convenient to just create table/column names as user has typed in the ER diagram ?
[11 Jan 2010 20:13] Alfredo Kojima
Changed description, this is unrelated to synchronization.

Made clicking toolbar button or menu item save active changes in Mac.
[22 Jan 2010 18:23] Alfredo Kojima
B - 4 is not a bug. Clicking Save without pressing Enter doesn't save ongoing changes to the text field. 
Thats why the 1st save doesn't work. Clicking out of the field editor will force the changes to be applied, which causes the * to appear. Then the 2nd time you save you get it to work. If you did:

1. Change ACCOUNT.CITY from VARCHAR(N) to VARCHAR(M) - subst M and N.
3. move the cursor away from column datatype -- (say) click on a table in the ER diagram
2. Hit the save button
   - Note that file is saved, but cursor is still editing CITY column datatype.
3. Goto database --> synchronize model

it would work the same.
[28 Apr 2010 15:57] Alfredo Kojima
Fixed in Windows, Mac.
[28 Apr 2010 19:17] Alfredo Kojima
Fixed in Linux too.
[7 May 2010 14:54] Johannes Taxacher
fix confirmed in repository
[10 May 2010 10:14] Tony Bedford
An entry has been added to the 5.2.21 changelog:

If some changes were made in the Table Editor, and the editor was still in edit mode, then the active changes in the Table Editor were not saved when the model was saved.