summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_innodb.test
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2010-11-22 14:47:28 +0300
committerRamil Kalimullin <ramil@mysql.com>2010-11-22 14:47:28 +0300
commitcc5263b223c9bc65d2a98276020a56d23c2fde29 (patch)
tree318334755d94aef3ee64545c0a4a566380f9162f /mysql-test/t/partition_innodb.test
parentaab0c52976a9d647388525423f7c7e8d25ad4118 (diff)
parent218ca24cd9f8261b2473de6792067de75d95ca31 (diff)
downloadmariadb-git-cc5263b223c9bc65d2a98276020a56d23c2fde29.tar.gz
Manual merge from mysql-5.5-bugteam.
Diffstat (limited to 'mysql-test/t/partition_innodb.test')
-rw-r--r--mysql-test/t/partition_innodb.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index 21769a8b944..86bbe359873 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -607,3 +607,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;