summaryrefslogtreecommitdiff
path: root/mysql-test/main/partition_innodb.test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-01-30 00:37:11 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-04-03 16:47:27 +0400
commit914bb5387fa1a0e7324573370fb353ea41bffc0f (patch)
tree0a5036578e6d6e13af3843aea2b6bfa0121b8dd6 /mysql-test/main/partition_innodb.test
parent878f83151f58b8fbf1b6102f32c5bfabbca3c478 (diff)
downloadmariadb-git-914bb5387fa1a0e7324573370fb353ea41bffc0f.tar.gz
Removed redundant partitioning check
This check was introduced in 602a222 and then became redundant in ad1553e, where we attempt to open a table even for non-copy algorithms. Added missing test case from 602a222. Part of MDEV-17805 - Remove InnoDB cache for temporary tables.
Diffstat (limited to 'mysql-test/main/partition_innodb.test')
-rw-r--r--mysql-test/main/partition_innodb.test19
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".