summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-02-03 12:44:09 +0100
committerSergei Golubchik <serg@mariadb.org>2022-02-03 15:28:12 +0100
commitc0f5fd27549c84607defa64c5b651343dd29e0ee (patch)
tree6700e0fe97cb18ccc4ac6b81f33671d312cf2cea /mysql-test
parenta450d58ad0fb9d418b2f999938e0355616aff175 (diff)
downloadmariadb-git-c0f5fd27549c84607defa64c5b651343dd29e0ee.tar.gz
MDEV-27683 EXCHANGE PARTITION allows different index direction, but causes further errorsbb-10.2-MDEV-277400
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/partition_exchange.result11
-rw-r--r--mysql-test/main/partition_exchange.test13
2 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/main/partition_exchange.result b/mysql-test/main/partition_exchange.result
index 297928478bf..2b69e2fff43 100644
--- a/mysql-test/main/partition_exchange.result
+++ b/mysql-test/main/partition_exchange.result
@@ -1239,3 +1239,14 @@ DROP TABLE t1, t2;
#
# End of 10.3 tests
#
+#
+# MDEV-27683 EXCHANGE PARTITION allows different index direction, but causes further errors
+#
+CREATE TABLE t1 (a INT, KEY(a DESC)) PARTITION BY KEY(a) PARTITIONS 4;
+CREATE TABLE t2 (a INT, KEY(a));
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Tables have different definitions
+DROP TABLE t1, t2;
+#
+# End of 10.8 tests
+#
diff --git a/mysql-test/main/partition_exchange.test b/mysql-test/main/partition_exchange.test
index 7e4addebe2f..3383ebb01e3 100644
--- a/mysql-test/main/partition_exchange.test
+++ b/mysql-test/main/partition_exchange.test
@@ -535,3 +535,16 @@ DROP TABLE t1, t2;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-27683 EXCHANGE PARTITION allows different index direction, but causes further errors
+--echo #
+CREATE TABLE t1 (a INT, KEY(a DESC)) PARTITION BY KEY(a) PARTITIONS 4;
+CREATE TABLE t2 (a INT, KEY(a));
+--error ER_TABLES_DIFFERENT_METADATA
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+DROP TABLE t1, t2;
+
+--echo #
+--echo # End of 10.8 tests
+--echo #