summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
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 #