List:Commits« Previous MessageNext Message »
From:ramil Date:July 5 2006 9:29am
Subject:bk commit into 4.1 tree (ramil:1.2528) BUG#9719
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of ram. When ram 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
  1.2528 06/07/05 14:29:02 ramil@stripped +3 -0
  Fix for bug #9719: DELETE with WHERE on HEAP table just deletes first row of matched set.

  mysql-test/t/heap_btree.test
    1.14 06/07/05 14:27:40 ramil@stripped +18 -0
    Fix for bug #9719: DELETE with WHERE on HEAP table just deletes first row of matched set.
      - test case.

  mysql-test/r/heap_btree.result
    1.18 06/07/05 14:27:40 ramil@stripped +34 -0
    Fix for bug #9719: DELETE with WHERE on HEAP table just deletes first row of matched set.
      - test result.

  heap/hp_delete.c
    1.14 06/07/05 14:27:39 ramil@stripped +3 -0
    Fix for bug #9719: DELETE with WHERE on HEAP table just deletes first row of matched set.
      - reset info->lastkey_len for further heap_rnext/heap_rprev calls as well.

# 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:	ramil
# Host:	myoffice.izhnet.ru
# Root:	/usr/home/ram/work/4.1.b9719

--- 1.13/heap/hp_delete.c	2005-08-20 19:07:41 +05:00
+++ 1.14/heap/hp_delete.c	2006-07-05 14:27:39 +05:00
@@ -73,7 +73,10 @@ int hp_rb_delete_key(HP_INFO *info, regi
   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	2004-03-31 05:32:36 +05:00
+++ 1.18/mysql-test/r/heap_btree.result	2006-07-05 14:27:40 +05:00
@@ -246,3 +246,37 @@ DELETE from t1 where a < 100;
 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;

--- 1.13/mysql-test/t/heap_btree.test	2005-07-28 05:21:43 +05:00
+++ 1.14/mysql-test/t/heap_btree.test	2006-07-05 14:27:40 +05:00
@@ -164,4 +164,22 @@ DELETE from t1 where a < 100;
 SELECT * from t1;
 DROP TABLE t1;
 
+#
+# 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;
+
 # End of 4.1 tests
Thread
bk commit into 4.1 tree (ramil:1.2528) BUG#9719ramil5 Jul