List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:August 2 2006 5:07pm
Subject:bk commit into 4.1 tree (cmiller:1.2520) BUG#9719
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of cmiller. When cmiller does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-02 13:06:59-04:00, cmiller@stripped +3 -0
  Bug#9719: DELETE with WHERE on HEAP table just deletes first row of matched
  set.
  
  (Ramil's patch, recreated.)

  heap/hp_delete.c@stripped, 2006-08-02 13:06:58-04:00, cmiller@stripped +3 -0
    Reset info->lastkey_len for further heap_rnext/heap_rprev calls.

  mysql-test/r/heap_btree.result@stripped, 2006-08-02 13:06:58-04:00, cmiller@stripped +35 -0
    Test for bug #9719: DELETE with WHERE on HEAP table just deletes first 
    row of matched set.

  mysql-test/t/heap_btree.test@stripped, 2006-08-02 13:06:58-04:00, cmiller@stripped +19 -1
    Test for bug #9719: DELETE with WHERE on HEAP table just deletes first 
    row of matched set.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	cmiller
# Host:	zippy.cornsilk.net
# Root:	/home/cmiller/work/mysql/m41-maint--07OBQ

--- 1.13/heap/hp_delete.c	2006-08-02 13:07:02 -04:00
+++ 1.14/heap/hp_delete.c	2006-08-02 13:07:02 -04:00
@@ -73,7 +73,10 @@
   int res;
 
   if (flag) 
+  {
     info->last_pos= NULL; /* For heap_rnext/heap_rprev */
+    info->lastkey_len= 0;
+  }
 
   custom_arg.keyseg= keyinfo->seg;
   custom_arg.key_length= hp_rb_make_key(keyinfo, info->recbuf, record, recpos);

--- 1.17/mysql-test/r/heap_btree.result	2006-08-02 13:07:02 -04:00
+++ 1.18/mysql-test/r/heap_btree.result	2006-08-02 13:07:02 -04:00
@@ -246,3 +246,38 @@
 SELECT * from t1;
 a
 DROP TABLE t1;
+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;
+a
+3
+3
+3
+3
+delete from t1 where a < 4;
+select a from t1;
+a
+insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
+select a from t1 where a > 4;
+a
+delete from t1 where a > 4;
+select a from t1;
+a
+3
+3
+1
+3
+3
+1
+2
+2
+2
+select a from t1 where a > 3;
+a
+delete from t1 where a >= 2;
+select a from t1;
+a
+1
+1
+drop table t1;
+End of 4.1 tests

--- 1.13/mysql-test/t/heap_btree.test	2006-08-02 13:07:02 -04:00
+++ 1.14/mysql-test/t/heap_btree.test	2006-08-02 13:07:02 -04:00
@@ -164,4 +164,22 @@
 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
Thread
bk commit into 4.1 tree (cmiller:1.2520) BUG#9719Chad MILLER2 Aug