Bug #54740 | wrong ADD / DROP INDEX pair on db sync | ||
---|---|---|---|
Submitted: | 23 Jun 2010 14:23 | Modified: | 29 Jun 2010 12:38 |
Reporter: | Stas Trefilov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench: Modeling | Severity: | S2 (Serious) |
Version: | 5.2.24 RC | OS: | Any (Mac 10.5.8, Ubuntu) |
Assigned to: | Alexander Musienko | CPU Architecture: | Any |
Tags: | schema sync drop add index |
[23 Jun 2010 14:23]
Stas Trefilov
[23 Jun 2010 14:24]
Stas Trefilov
synchronize window with ADD / DROP INDEX statement
Attachment: db_sync.png (image/png, text), 123.88 KiB.
[24 Jun 2010 6:32]
Susanne Ebrecht
Many thanks for writing a bug report. I was able to reproduce this. STEP 1: Use CLI CREATE DATABASE bug54740; USE bug54740; CREATE TABLE t(i SERIAL, j INTEGER, v VARCHAR(100))ENGINE=innodb; STEP 2: Open Workbench Reverse Engineer Database Double click table t Add unsigned integer column "k" Add index i_k on column k STEP 3: Use CLI USE bug54740; ALTER TABLE t ADD COLUMN k INTEGER UNSIGNED; CREATE INDEX i_k ON t(k); Step 4: Use Workbench Sync your model Ignore mydb and press next You will get the following result: ALTER TABLE `miracee`.`t` DROP INDEX `i` , ADD UNIQUE INDEX `i` (`k` ASC) , DROP INDEX `i_k` , ADD INDEX `i_k` () ;
[29 Jun 2010 11:55]
Mike Lischke
fix confirmed in repository
[29 Jun 2010 12:38]
Tony Bedford
An entry has been added to the 5.2.25 changelog: When synchronizing a model with the live database, the generated SQL included erroneous DROP and ADD column statements, and also erroneous ADD and DROP index statements.