summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria/truncate.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/maria/truncate.test')
-rw-r--r--mysql-test/suite/maria/truncate.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/truncate.test b/mysql-test/suite/maria/truncate.test
index 3d6e70d9db6..11d42dc3879 100644
--- a/mysql-test/suite/maria/truncate.test
+++ b/mysql-test/suite/maria/truncate.test
@@ -45,3 +45,16 @@ select * from t1;
truncate t1;
select count(*) from t1;
drop table t1,t2;
+
+#
+# MDEV-3890
+# Server crash inserting record on a temporary table after truncating it
+#
+CREATE TEMPORARY TABLE t1 ( i int) ENGINE=aria;
+SHOW CREATE TABLE t1;
+TRUNCATE TABLE t1;
+INSERT INTO t1 (i) VALUES (1);
+lock table t1 write;
+truncate table t1;
+unlock tables;
+drop table t1;