diff --git a/mysql-test/innodb_bug44571.result b/mysql-test/innodb_bug44571.result index 36374edcb3e..7ee7820a02d 100644 --- a/mysql-test/innodb_bug44571.result +++ b/mysql-test/innodb_bug44571.result @@ -2,8 +2,7 @@ CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; ALTER TABLE bug44571 CHANGE foo bar INT; ALTER TABLE bug44571 ADD INDEX bug44571b (foo); ERROR 42000: Key column 'foo' doesn't exist in table -ALTER TABLE bug44571 ADD INDEX bug44571b (bar); -ERROR HY000: Incorrect key file for table 'bug44571'; try to repair it -CREATE INDEX bug44571b ON bug44571 (bar); -ERROR HY000: Incorrect key file for table 'bug44571'; try to repair it +ALTER TABLE bug44571 ADD INDEX bug44571c (bar); +DROP INDEX bug44571c ON bug44571; +CREATE INDEX bug44571c ON bug44571 (bar); DROP TABLE bug44571; diff --git a/mysql-test/innodb_bug44571.test b/mysql-test/innodb_bug44571.test index 685463ceff9..91b6722d8af 100644 --- a/mysql-test/innodb_bug44571.test +++ b/mysql-test/innodb_bug44571.test @@ -1,17 +1,22 @@ # # Bug#44571 InnoDB Plugin crashes on ADD INDEX # http://bugs.mysql.com/44571 +# Please also refer to related fix in +# http://bugs.mysql.com/47621 # -- source include/have_innodb.inc CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; ALTER TABLE bug44571 CHANGE foo bar INT; +# Create index with the old column name will fail, +# because the CHANGE foo bar is successful. And +# the column name change would communicate to +# InnoDB with the fix from bug #47621 -- error ER_KEY_COLUMN_DOES_NOT_EXITS ALTER TABLE bug44571 ADD INDEX bug44571b (foo); -# The following will fail, because the CHANGE foo bar was -# not communicated to InnoDB. ---error ER_NOT_KEYFILE -ALTER TABLE bug44571 ADD INDEX bug44571b (bar); ---error ER_NOT_KEYFILE -CREATE INDEX bug44571b ON bug44571 (bar); +# The following create indexes should succeed, +# indirectly confirm the CHANGE foo bar is successful. +ALTER TABLE bug44571 ADD INDEX bug44571c (bar); +DROP INDEX bug44571c ON bug44571; +CREATE INDEX bug44571c ON bug44571 (bar); DROP TABLE bug44571;