summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/heap.result6
-rw-r--r--mysql-test/t/heap.test10
2 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result
index a7a69694b65..13f452e26d8 100644
--- a/mysql-test/r/heap.result
+++ b/mysql-test/r/heap.result
@@ -197,3 +197,9 @@ a b
INSERT INTO t1 VALUES (1,3);
Duplicate entry '3' for key 1
DROP TABLE t1;
+CREATE TABLE t1 (a int not null, primary key(a)) type=heap;
+INSERT into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11);
+DELETE from t1 where a < 100;
+SELECT * from t1;
+a
+DROP TABLE t1;
diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test
index 1b7175d375c..ef7e3239a96 100644
--- a/mysql-test/t/heap.test
+++ b/mysql-test/t/heap.test
@@ -128,3 +128,13 @@ SELECT * FROM t1 WHERE b<=>NULL;
--error 1062
INSERT INTO t1 VALUES (1,3);
DROP TABLE t1;
+
+#
+# Test when deleting all rows
+#
+
+CREATE TABLE t1 (a int not null, primary key(a)) type=heap;
+INSERT into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11);
+DELETE from t1 where a < 100;
+SELECT * from t1;
+DROP TABLE t1;