List:Commits« Previous MessageNext Message »
From:Sunny Bains Date:May 27 2011 3:41am
Subject:bzr push into mysql-trunk branch (Sunny.Bains:3125 to 3126)
View as plain text  
 3126 Sunny Bains	2011-05-27
      Bug 12399395 - ASSERTION FAILURE !MUTEX_OWN(MUTEX) IN SYNC0SYNC.IC LINE 207 4 of 103 
      
      When we select a victim during deadlock checking we acquire the trx_t::mutex
      on behalf of that transaction. We check for this when discarding the victim
      transaction's locks. If it is a deadlock victim there is no need to re-acquire
      the trx_t::mutex.
      
      rb://670 Approved by Jimmy Yang.

    modified:
      storage/innobase/lock/lock0lock.c
 3125 Dmitry Lenev	2011-05-26 [merge]
      Merged fix for bug #11762012 - "54553: INNODB ASSERTS IN
      HA_INNOBASE::UPDATE_ROW, TEMPORARY TABLE, TABLE LOCK" into
      mysql-trunk.

    modified:
      mysql-test/suite/innodb/r/innodb_mysql.result
      mysql-test/suite/innodb/t/innodb_mysql.test
      sql/sql_parse.cc
=== modified file 'storage/innobase/lock/lock0lock.c'
--- a/storage/innobase/lock/lock0lock.c	revid:dmitry.lenev@stripped
+++ b/storage/innobase/lock/lock0lock.c	revid:sunny.bains@stripped
@@ -4393,7 +4393,11 @@ lock_trx_table_locks_remove(
 
 	ut_ad(lock_mutex_own());
 
-	trx_mutex_enter(trx);
+	if (!trx->lock.was_chosen_as_deadlock_victim) {
+		trx_mutex_enter(trx);
+	} else {
+		ut_ad(trx_mutex_own(trx));
+	}
 
 	for (i = ib_vector_size(trx->lock.table_locks) - 1; i >= 0; --i) {
 		const lock_t*	lock;
@@ -4410,12 +4414,18 @@ lock_trx_table_locks_remove(
 
 		if (lock == lock_to_remove) {
 			ib_vector_set(trx->lock.table_locks, i, NULL);
-			trx_mutex_exit(trx);
+
+			if (!trx->lock.was_chosen_as_deadlock_victim) {
+				trx_mutex_exit(trx);
+			}
+
 			return;
 		}
 	}
 
-	trx_mutex_exit(trx);
+	if (!trx->lock.was_chosen_as_deadlock_victim) {
+		trx_mutex_exit(trx);
+	}
 
 	/* Lock must exist in the vector. */
 	ut_error;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (Sunny.Bains:3125 to 3126) Sunny Bains27 May