Bug #33410 Undo broken - does not restore previous state
Submitted: 20 Dec 2007 16:09 Modified: 26 Dec 2007 12:55
Reporter: Roland Bouman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.10 OSS, 5.0.11a OS:Windows (winxp home)
Assigned to: CPU Architecture:Any

[20 Dec 2007 16:09] Roland Bouman
Description:
WB silently removes the fk columns when deleting a relationship on the canvas. (see http://bugs.mysql.com/bug.php?id=32958) When undo-ing he delete, the column is undeleted, but appended to the end of the columnlist. It does not regain its original position. 

While this can be manually re-organized, it is highly irritating. It is also a sign that undo does not work properly - a proper undo would restore to the exact previous state - not just compensate the last action.

How to repeat:
create a table t with 1 column c1
create another table t2 with 2 columns:
c2 at position1 
and 
c3 at position2

ensure that c1 and c2 are of the same data type

create a 1:many relationship. Be sure to check the "Pick columns" checkbox. use c2 as fk column, use c1 as pk column.

Now, delete the relationship. Observe silent deletion of column c2. (#32958) 
Then, undo. Observe relationship is undeleted, and column c2 now appears *after* column c3 - not before where it was originally.

Suggested fix:
Please make sure undo restores to the exact previous state. Unexact undo is just one step away from corruption of the model - as in, the tool changes the data in a way that was never ordered by the user.
[21 Dec 2007 11:32] MySQL Verification Team
Thank you for the bug report.
[26 Dec 2007 12:55] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html