MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:jan.lindstrom Date:April 13 2005 9:07am
Subject:bk commit into 5.0 tree (jan:1.1820) BUG#9354
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jan. When jan 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.1820 05/04/13 12:07:16 jan@stripped +1 -0
  Fixed a bug where next-key locking doesn't allow the insert which does 
  not produce phantom (bug #9354).

  innobase/row/row0sel.c
    1.84 05/04/13 12:06:41 jan@stripped +14 -0
    Fixed a bug where next-key locking doesn't allow the insert which does 
    not produce phantom (bug #9354).

# 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:	jan
# Host:	hundin.mysql.fi
# Root:	/home/jan/orig/mysql-5.0

--- 1.83/innobase/row/row0sel.c	Wed Apr  6 21:29:11 2005
+++ 1.84/innobase/row/row0sel.c	Wed Apr 13 12:06:41 2005
@@ -3686,6 +3686,20 @@
  			}
 		}
 
+		/* If a constant search tuple is found directly from 
+		the cluster index we lock only a record. 
+		For example: WHERE a >= 100, where a is primary key */
+
+		if(index == clust_index &&
+				match_mode == ROW_SEL_OPEN_CURSOR &&
+				mode == PAGE_CUR_GE &&
+				dtuple_get_n_fields_cmp(search_tuple)
+				== dict_index_get_n_unique(index) &&
+				!cmp_dtuple_rec(search_tuple, rec, offsets)) {
+
+			lock_type = LOCK_REC_NOT_GAP;
+		}
+
 		err = sel_set_rec_lock(rec, index, offsets,
 					prebuilt->select_lock_type,
 					lock_type, thr);
Thread
bk commit into 5.0 tree (jan:1.1820) BUG#9354jan.lindstrom13 Apr