summaryrefslogtreecommitdiff
path: root/mysql-test/t/heap_btree.test
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2006-08-02 13:06:59 -0400
committerunknown <cmiller@zippy.cornsilk.net>2006-08-02 13:06:59 -0400
commitf4fb48bab0c61a769cd7efabfba41e0ca672abcd (patch)
treef1078fdaf773c7b1ea8bf167ef14595a887b78b9 /mysql-test/t/heap_btree.test
parent98daac18656274f32d57f5bdcef668f73e74bcb2 (diff)
downloadmariadb-git-f4fb48bab0c61a769cd7efabfba41e0ca672abcd.tar.gz
Bug#9719: DELETE with WHERE on HEAP table just deletes first row of matched
set. (Ramil's patch, recreated.) heap/hp_delete.c: Reset info->lastkey_len for further heap_rnext/heap_rprev calls. mysql-test/r/heap_btree.result: Test for bug #9719: DELETE with WHERE on HEAP table just deletes first row of matched set. mysql-test/t/heap_btree.test: Test for bug #9719: DELETE with WHERE on HEAP table just deletes first row of matched set.
Diffstat (limited to 'mysql-test/t/heap_btree.test')
-rw-r--r--mysql-test/t/heap_btree.test20
1 files changed, 19 insertions, 1 deletions
diff --git a/mysql-test/t/heap_btree.test b/mysql-test/t/heap_btree.test
index aea9e9486e5..f510f97fe9b 100644
--- a/mysql-test/t/heap_btree.test
+++ b/mysql-test/t/heap_btree.test
@@ -164,4 +164,22 @@ DELETE from t1 where a < 100;
SELECT * from t1;
DROP TABLE t1;
-# End of 4.1 tests
+#
+# Bug #9719: problem with delete
+#
+
+create table t1(a int not null, key using btree(a)) engine=heap;
+insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
+select a from t1 where a > 2;
+delete from t1 where a < 4;
+select a from t1;
+insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
+select a from t1 where a > 4;
+delete from t1 where a > 4;
+select a from t1;
+select a from t1 where a > 3;
+delete from t1 where a >= 2;
+select a from t1;
+drop table t1;
+
+--echo End of 4.1 tests