List:Commits« Previous MessageNext Message »
From:marko.makela Date:January 25 2011 11:27am
Subject:bzr commit into mysql-trunk-innodb branch (marko.makela:3459)
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.6-innodb/ based on revid:marko.makela@strippedpb947u9wq5c2

 3459 Marko Mäkelä	2011-01-25
      Add some debug assertions to unlocking.
      
      lock_rec_unlock(): Assert that the transaction is active
      and has no waiting lock.
      
      lock_unlock_table_autoinc(): Assert that the transaction has not been started
      or it is active. Assert that it has no waiting lock.

    modified:
      storage/innobase/lock/lock0lock.c
=== modified file 'storage/innobase/lock/lock0lock.c'
--- a/storage/innobase/lock/lock0lock.c	revid:marko.makela@oracle.com-20110125105135-g7brpb947u9wq5c2
+++ b/storage/innobase/lock/lock0lock.c	revid:marko.makela@stripped10125112705-c16smqlyv2azjpau
@@ -4174,8 +4174,11 @@ lock_rec_unlock(
 	ulint	heap_no;
 	size_t	stmt_len;
 
-	ut_ad(trx && rec);
+	ut_ad(trx);
+	ut_ad(rec);
 	ut_ad(block->frame == page_align(rec));
+	ut_ad(!trx->lock.wait_lock);
+	ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
 
 	heap_no = page_rec_get_heap_no(rec);
 
@@ -6117,6 +6120,9 @@ lock_unlock_table_autoinc(
 {
 	ut_ad(!lock_mutex_own());
 	ut_ad(!trx_mutex_own(trx));
+	ut_ad(!trx->lock.wait_lock);
+	ut_ad(trx_state_eq(trx, TRX_STATE_NOT_STARTED)
+	      || trx_state_eq(trx, TRX_STATE_ACTIVE));
 
 	/* This function is invoked for a running transaction by the
 	thread that is serving the transaction. Therefore it is not

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110125112705-c16smqlyv2azjpau.bundle
Thread
bzr commit into mysql-trunk-innodb branch (marko.makela:3459) marko.makela25 Jan