diff options
Diffstat (limited to 'mysql-test/main/partition_innodb.test')
-rw-r--r-- | mysql-test/main/partition_innodb.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/main/partition_innodb.test b/mysql-test/main/partition_innodb.test index e09a2b4f9d3..ae0ce59fabc 100644 --- a/mysql-test/main/partition_innodb.test +++ b/mysql-test/main/partition_innodb.test @@ -665,6 +665,25 @@ OPTIMIZE TABLE t1; SET SESSION sql_mode = @old_mode; DROP TABLE t1; + +--echo # +--echo # Bug#57985 "ONLINE/FAST ALTER PARTITION can fail and leave the +--echo # table unusable". +--echo # +CREATE TABLE t1 (a bigint not null, b int not null, PRIMARY KEY (a)) + ENGINE = InnoDB PARTITION BY KEY(a) PARTITIONS 2; +INSERT INTO t1 values (0,1), (1,2); +--echo # The below ALTER should fail. It should leave the +--echo # table in its original, non-corrupted, usable state. +--error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF +ALTER TABLE t1 ADD UNIQUE KEY (b); +--echo # The below statements should succeed, as ALTER should +--echo # have left table intact. +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + + --echo # --echo # Bug#57985 "ONLINE/FAST ALTER PARTITION can fail and leave the --echo # table unusable". |