Bug #49275 Using ALTER TABLE wizard to change table name fails
Submitted: 1 Dec 2009 17:02 Modified: 8 Dec 2009 11:27
Reporter: Todd Farmer (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2 r4643 OS:Windows (XP)
Assigned to: Alexander Musienko CPU Architecture:Any

[1 Dec 2009 17:02] Todd Farmer
Description:
Using the ALTER TABLE wizard, I modified the table name.  Instead of creating an appropriate ALTER TABLE command, it created a CREATE TABLE command.  This would create a new table as a duplicate of the one I intended to rename.

How to repeat:
See above.

Suggested fix:
Create appropriate ALTER TABLE tbl RENAME TO newTbl command.
[4 Dec 2009 12:11] Mike Lischke
I cannot repeat this problem. What I did was.

1) Open WB, open connection to a 5.1 server (localhost).
2) Switched to my test schema.
3) Right click on table3 => Alter...
4) Entered a new name (NewTable).
5) Clicked apply, wizard appears. 
6) DDL says
  ALTER TABLE `test`.`table3` RENAME TO  `test`.`newtable`
[4 Dec 2009 12:12] Mike Lischke
Can anyone of you give me a hint if you used another sequence to reproduce the problem?
[4 Dec 2009 21:33] Johannes Taxacher
this fix has been included in 5.2.10
[8 Dec 2009 11:27] Tony Bedford
An entry has been added to the 5.2.10 changelog:

When using Alter Table in the SQL Editor, if a table name was changed, and the Apply button clicked, the Apply Object Changes wizard was launched. The Review changes page indicated that the script that would be applied would incorrectly create a new table as a duplicate of the table being renamed, rather than use ALTER to rename the table.