List:Internals« Previous MessageNext Message »
From:Heikki Tuuri Date:July 1 2005 8:06pm
Subject:bk commit into 5.0 tree (heikki:1.1995) BUG#3300
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of heikki. When heikki 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.1995 05/07/01 21:06:23 heikki@stripped +2 -0
  trx0trx.ic, trx0trx.h:
    Fix bug in the Bug #3300 bug fix

  innobase/include/trx0trx.ic
    1.4 05/07/01 21:04:01 heikki@stripped +13 -5
    Fix bug in the Bug #3300 bug fix

  innobase/include/trx0trx.h
    1.49 05/07/01 21:03:57 heikki@stripped +4 -4
    Fix bug in the Bug #3300 bug fix

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

--- 1.48/innobase/include/trx0trx.h	Fri Jul  1 20:41:45 2005
+++ 1.49/innobase/include/trx0trx.h	Fri Jul  1 21:03:57 2005
@@ -29,16 +29,16 @@
 /*========================*/
 	trx_t*	trx);	/* in: transaction struct */
 /*****************************************************************
-Registers that we have set a new record lock on an index. This can only be
-called twice after calling trx_reset_new_rec_lock_info(), since we only have
-space to store 2 indexes! */
+Registers that we have set a new record lock on an index. We only have
+space to store 2 indexes! If this is called more than twice after
+trx_reset_new_rec_lock_info(), then this function does nothing. */
 UNIV_INLINE
 void
 trx_register_new_rec_lock(
 /*======================*/
 	trx_t*		trx,	/* in: transaction struct */
 	dict_index_t*	index);	/* in: trx sets a new record lock on this
-				index*/
+				index */
 /*****************************************************************
 Checks if trx has set a new record lock on an index. */
 UNIV_INLINE

--- 1.3/innobase/include/trx0trx.ic	Fri Jul  1 20:41:40 2005
+++ 1.4/innobase/include/trx0trx.ic	Fri Jul  1 21:04:01 2005
@@ -52,16 +52,16 @@
 }
 
 /*****************************************************************
-Registers that we have set a new record lock on an index. This can only be
-called twice after calling trx_reset_new_rec_lock_info(), since we only have
-space to store 2 indexes! */
+Registers that we have set a new record lock on an index. We only have
+space to store 2 indexes! If this is called more than twice after
+trx_reset_new_rec_lock_info(), then this function does nothing. */
 UNIV_INLINE
 void
 trx_register_new_rec_lock(
 /*======================*/
 	trx_t*		trx,	/* in: transaction struct */
 	dict_index_t*	index)	/* in: trx sets a new record lock on this
-				index*/
+				index */
 {
 	if (trx->new_rec_locks[0] == NULL) {
 		trx->new_rec_locks[0] = index;
@@ -69,7 +69,15 @@
 		return;
 	}
 
-	ut_a(trx->new_rec_locks[1] == NULL);
+	if (trx->new_rec_locks[0] == index) {
+
+		return;
+	}
+
+	if (trx->new_rec_locks[1] != NULL) {
+
+		return;
+	}
 
 	trx->new_rec_locks[1] = index;
 }
Thread
bk commit into 5.0 tree (heikki:1.1995) BUG#3300Heikki Tuuri1 Jul