summaryrefslogtreecommitdiff
path: root/mysql-test/main/long_unique_bugs.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/long_unique_bugs.test')
-rw-r--r--mysql-test/main/long_unique_bugs.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test
index b2d4dd96831..99f83b09191 100644
--- a/mysql-test/main/long_unique_bugs.test
+++ b/mysql-test/main/long_unique_bugs.test
@@ -373,3 +373,15 @@ ANALYZE TABLE t1 PERSISTENT FOR ALL;
# Cleanup
DROP TABLE t1;
+
+#
+# MDEV-22719 Long unique keys are not created when individual key_part->length < max_key_length but SUM(key_parts->length) > max_key_length
+#
+
+CREATE TABLE t1 (a int, b VARCHAR(1000), UNIQUE (a,b)) ENGINE=MyISAM;
+show index from t1;
+CREATE TABLE t2 (a varchar(900), b VARCHAR(900), UNIQUE (a,b)) ENGINE=MyISAM;
+show index from t2;
+
+# Cleanup
+DROP TABLE t1,t2;