List:Commits« Previous MessageNext Message »
From:marko.makela Date:January 25 2011 11:27am
Subject:bzr push into mysql-trunk-innodb branch (marko.makela:3458 to 3459)
View as plain text  
 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
 3458 Marko Mäkelä	2011-01-25 [merge]
      Merge mysql-5.5-innodb to mysql-trunk-innodb.

    modified:
      storage/innobase/mtr/mtr0log.c
=== modified file 'storage/innobase/lock/lock0lock.c'
--- a/storage/innobase/lock/lock0lock.c	revid:marko.makela@stripped
+++ b/storage/innobase/lock/lock0lock.c	revid:marko.makela@stripped
@@ -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 push into mysql-trunk-innodb branch (marko.makela:3458 to 3459) marko.makela25 Jan