Commit ed1c90fa authored by jyang's avatar jyang

branches/zip: Once change in bug #47621 merges into zip branch,

zip only test innodb_bug44571 needs to be updated to reflect the
column name change would be successful be done in InnoDB as well.
parent 86018ed1
...@@ -2,8 +2,7 @@ CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; ...@@ -2,8 +2,7 @@ CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB;
ALTER TABLE bug44571 CHANGE foo bar INT; ALTER TABLE bug44571 CHANGE foo bar INT;
ALTER TABLE bug44571 ADD INDEX bug44571b (foo); ALTER TABLE bug44571 ADD INDEX bug44571b (foo);
ERROR 42000: Key column 'foo' doesn't exist in table ERROR 42000: Key column 'foo' doesn't exist in table
ALTER TABLE bug44571 ADD INDEX bug44571b (bar); ALTER TABLE bug44571 ADD INDEX bug44571c (bar);
ERROR HY000: Incorrect key file for table 'bug44571'; try to repair it DROP INDEX bug44571c ON bug44571;
CREATE INDEX bug44571b ON bug44571 (bar); CREATE INDEX bug44571c ON bug44571 (bar);
ERROR HY000: Incorrect key file for table 'bug44571'; try to repair it
DROP TABLE bug44571; DROP TABLE bug44571;
# #
# Bug#44571 InnoDB Plugin crashes on ADD INDEX # Bug#44571 InnoDB Plugin crashes on ADD INDEX
# http://bugs.mysql.com/44571 # http://bugs.mysql.com/44571
# Please also refer to related fix in
# http://bugs.mysql.com/47621
# #
-- source include/have_innodb.inc -- source include/have_innodb.inc
CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB;
ALTER TABLE bug44571 CHANGE foo bar INT; 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 -- error ER_KEY_COLUMN_DOES_NOT_EXITS
ALTER TABLE bug44571 ADD INDEX bug44571b (foo); ALTER TABLE bug44571 ADD INDEX bug44571b (foo);
# The following will fail, because the CHANGE foo bar was # The following create indexes should succeed,
# not communicated to InnoDB. # indirectly confirm the CHANGE foo bar is successful.
--error ER_NOT_KEYFILE ALTER TABLE bug44571 ADD INDEX bug44571c (bar);
ALTER TABLE bug44571 ADD INDEX bug44571b (bar); DROP INDEX bug44571c ON bug44571;
--error ER_NOT_KEYFILE CREATE INDEX bug44571c ON bug44571 (bar);
CREATE INDEX bug44571b ON bug44571 (bar);
DROP TABLE bug44571; DROP TABLE bug44571;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment