List:Commits« Previous MessageNext Message »
From:Sunny Bains Date:April 21 2011 10:16pm
Subject:bzr push into mysql-trunk-innodb branch (Sunny.Bains:3603 to 3604)
View as plain text  
 3604 Sunny Bains	2011-04-22
      Bug 12384651 - ASSERT AT LOCK_TABLE_QUEUE_VALIDATE ON RQG TEST RUNS
      
      Remove the assertion and accompanying code. We were counting the table
      locks held by a transaction multiple times. This is because a transaction
      can have multiple table locks. The stale locks are not removed and this
      is by design. We are already checking whether the transaction holds the
      table lock that the table lock list claims that it does. What we were
      trying to check for was whether there are any locks in the trx table lock
      vector that the table doesn't know about.
      
      This is a debug change, should not affect production code.

    modified:
      storage/innobase/lock/lock0lock.c
 3603 Marko Mäkelä	2011-04-21
      Fix the UNIV_HOTBACKUP build.

    modified:
      storage/innobase/dict/dict0dict.c
      storage/innobase/include/dict0dict.h
      storage/innobase/include/log0recv.h
      storage/innobase/include/srv0mon.h
      storage/innobase/include/trx0sys.h
      storage/innobase/include/univ.i
      storage/innobase/log/log0recv.c
      storage/innobase/os/os0file.c
      storage/innobase/page/page0zip.c
      storage/innobase/srv/srv0mon.c
=== modified file 'storage/innobase/lock/lock0lock.c'
--- a/storage/innobase/lock/lock0lock.c	revid:marko.makela@stripped45-13329p4tqicfj583
+++ b/storage/innobase/lock/lock0lock.c	revid:sunny.bains@strippedsathlt
@@ -5083,7 +5083,6 @@ lock_table_queue_validate(
 	dict_table_t*	table)	/*!< in: table */
 {
 	lock_t*		lock;
-	ulint		count = 0;
 
 	ut_ad(lock_mutex_own());
 #ifdef UNIV_SYNC_DEBUG
@@ -5094,9 +5093,6 @@ lock_table_queue_validate(
 	     lock != NULL;
 	     lock = UT_LIST_GET_NEXT(un_member.tab_lock.locks, lock)) {
 
-		ulint		i;
-		ib_vector_t*	table_locks;
-
 		/* lock->trx->state cannot change from or to NOT_STARTED
 		while we are holding the trx_sys->lock. It may change
 		from ACTIVE to PREPARED, but it may not change to
@@ -5114,26 +5110,8 @@ lock_table_queue_validate(
 		}
 
 		ut_a(lock_trx_table_locks_find(lock->trx, lock));
-
-		/* Skip the NULL entries and only count the locks that
-		transactions have on this table. */
-		table_locks = lock->trx->lock.table_locks;
-
-		for (i = 0; i < ib_vector_size(table_locks); ++i) {
-			const lock_t*	trx_lock;
-
-			trx_lock = ib_vector_get(table_locks, i);
-
-			if (trx_lock != NULL
-			    && trx_lock->un_member.tab_lock.table == table) {
-
-				++count;
-			}
-		}
 	}
 
-	ut_a(count == UT_LIST_GET_LEN(table->locks));
-
 	return(TRUE);
 }
 

Attachment: [text/bzr-bundle] bzr/sunny.bains@oracle.com-20110421221539-ibcnm8lbiysathlt.bundle
Thread
bzr push into mysql-trunk-innodb branch (Sunny.Bains:3603 to 3604) Sunny Bains22 Apr