-
vdimov authored
The change in behavior was introduced by this changeset: ------------------------------------------------------------ revno: 3405 revision-id: joro@sun.com-20100317141846-es0qyf5zcqb0hu1c parent: davi.arnaut@sun.com-20100309125156-z2c4uyqque49v61k committer: Georgi Kodinov <joro@sun.com> branch nick: B49838-5.1-bugteam timestamp: Wed 2010-03-17 16:18:46 +0200 message: Bug #49838: DROP INDEX and ADD UNIQUE INDEX for same index may corrupt definition at engine If a single ALTER TABLE contains both DROP INDEX and ADD INDEX using the same index name (a.k.a. index modification) we need to disable in-place alter table because we can't ask the storage engine to have two copies of the index with the same name even temporarily (if we first do the ADD INDEX and then DROP INDEX) and we can't modify indexes that are needed by e.g. foreign keys if we first do DROP INDEX and then ADD INDEX. Fixed the problem by disabling in-place ALTER TABLE for these cases. modified: mysql-test/r/innodb_mysql.result sp1f-innodb_mysql.result-20060426055153-bychbbfnqtvmvrwccwhn24i6yi46uqjv mysql-test/t/innodb_mysql.test sp1f-innodb_mysql.test-20060816102624-6ymo37d3nyhvbqyzqn5ohsfuydwo426k sql/sql_table.cc sp1f-sql_table.cc-19700101030959-tzdkvgigezpuaxnldqh3fx2h7h2ggslu
c03341a0