diff options
author | Marc Alff <marc.alff@oracle.com> | 2010-11-21 14:32:48 +0100 |
---|---|---|
committer | Marc Alff <marc.alff@oracle.com> | 2010-11-21 14:32:48 +0100 |
commit | 218ca24cd9f8261b2473de6792067de75d95ca31 (patch) | |
tree | 6f388bd43f36d4b3086f63dbcf97467ca95c61ff /mysql-test/t/partition_innodb.test | |
parent | 8afd96e4d4ec6498babb78f5b41215491660ca74 (diff) | |
parent | f6deb00a56b2e87287d606aba3bcd71290d876ae (diff) | |
download | mariadb-git-218ca24cd9f8261b2473de6792067de75d95ca31.tar.gz |
local merge
Diffstat (limited to 'mysql-test/t/partition_innodb.test')
-rw-r--r-- | mysql-test/t/partition_innodb.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 3e9ac2ce2b5..ddc2812f617 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -569,3 +569,24 @@ SET SESSION sql_mode = 'NO_ZERO_DATE'; 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 # +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +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; |