Bug #50970 Changed index-name cannot be applied
Submitted: 7 Feb 2010 14:27 Modified: 9 Feb 2010 17:55
Reporter: Niels Postma Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.11 OSS Beta OS:Windows (XP SP3)
Assigned to: Alexander Musienko CPU Architecture:Any

[7 Feb 2010 14:27] Niels Postma
Description:
It is not possible to change an index' name from the 'Alter table' window.

When you apply the change, the generated SQL command tries to DROP the index first, but it's using the new index name, so it generates an error:

SQL Error 1091: Can't DROP 'username_bla'; check that column/key exists

How to repeat:
Create a table with some indexes, then right-click the table and choose 'Alter table...'.
Open the indexes tab and change a name of one of the indexes.
Click apply and check the generated SQL.
Click apply again and the error will occur.
[8 Feb 2010 15:05] Johannes Taxacher
put that into category modeling as it is a sync-code problem
[8 Feb 2010 18:08] Johannes Taxacher
fixed in repository
[9 Feb 2010 17:55] Tony Bedford
An entry has been added to the 5.2.16 changelog:

In the SQL Editor, if using the Alter Table dialog, attempting to apply changes after renaming an index resulted in the following error:

SQL Error 1091: Can't DROP 'username_foo'; check that column/key exists