summaryrefslogtreecommitdiff
path: root/mysql-test/t/truncate.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/truncate.test')
-rw-r--r--mysql-test/t/truncate.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/truncate.test b/mysql-test/t/truncate.test
index dd80baba269..434a1907e42 100644
--- a/mysql-test/t/truncate.test
+++ b/mysql-test/t/truncate.test
@@ -24,3 +24,15 @@ select * from t1;
drop table t1;
--error 1146
truncate non_existing_table;
+
+#
+# test autoincrement with TRUNCATE
+#
+
+create table t1 (a integer auto_increment primary key);
+insert into t1 (a) values (NULL),(NULL);
+truncate table t1;
+insert into t1 (a) values (NULL),(NULL);
+SELECT * from t1;
+drop table t1;
+