summaryrefslogtreecommitdiff
path: root/mysql-test/main/long_unique.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/long_unique.test')
-rw-r--r--mysql-test/main/long_unique.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/main/long_unique.test b/mysql-test/main/long_unique.test
index c0bd77ca5c9..2146b4b4638 100644
--- a/mysql-test/main/long_unique.test
+++ b/mysql-test/main/long_unique.test
@@ -556,4 +556,22 @@ SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
drop table t1,t2;
+--echo #
+--echo # MDEV-21470 MyISAM start_bulk_insert doesn't work with long unique
+--echo #
+
+CREATE TABLE t1 (a INT, b BLOB) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+CREATE TABLE t2 (c BIT, d BLOB, UNIQUE(d)) ENGINE=MyISAM;
+INSERT INTO t2 SELECT * FROM t1;
+DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-19338 Using AUTO_INCREMENT with long unique
+--echo #
+
+--error ER_NO_AUTOINCREMENT_WITH_UNIQUE
+CREATE TABLE t1 (pk INT, a TEXT NOT NULL DEFAULT '', PRIMARY KEY (pk), b INT AUTO_INCREMENT, UNIQUE(b), UNIQUE (a,b)) ENGINE=myisam;
+
+# Cleanup
set @@GLOBAL.max_allowed_packet= @allowed_packet;