List:Commits« Previous MessageNext Message »
From:marko.makela Date:August 19 2010 10:36am
Subject:bzr commit into mysql-5.5-innodb branch (marko.makela:3168) Bug#56114
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.5-innodb/ based on revid:jimmy.yang@strippedtukdtb23jv

 3168 Marko Mäkelä	2010-08-19
      Bug#56114 Disallow trx->dict_operation_lock_mode==RW_X_LATCH in srv_suspend_mysql_thread()
      
      Issue an error message to the error log when
      trx->dict_operation_lock_mode == RW_X_LATCH in
      srv_suspend_mysql_thread(). Transactions that modify InnoDB
      data dictionary tables must be free of lock waits, because they
      must be holding the data dictionary latch in exclusive mode.
      The transactions must not be accessing any other tables other than
      the data dictionary tables.
      
      The handling of RW_X_LATCH was accidentally added in the InnoDB Plugin,
      as a wrong fix of an assertion failure. (Fast index creation was accessing
      both data dictionary tables and user tables in the same transaction.)

    modified:
      storage/innobase/srv/srv0srv.c
=== modified file 'storage/innobase/srv/srv0srv.c'
--- a/storage/innobase/srv/srv0srv.c	revid:jimmy.yang@strippedom-20100819041647-wx9t9jtukdtb23jv
+++ b/storage/innobase/srv/srv0srv.c	revid:marko.makela@stripped37-objk0u6uvc6vj4m5
@@ -1588,6 +1588,18 @@ srv_suspend_mysql_thread(
 		row_mysql_unfreeze_data_dictionary(trx);
 		break;
 	case RW_X_LATCH:
+		/* There should never be a lock wait when the
+		dictionary latch is reserved in X mode.  Dictionary
+		transactions should only acquire locks on dictionary
+		tables, not other tables. All access to dictionary
+		tables should be covered by dictionary
+		transactions. */
+		ut_print_timestamp(stderr);
+		fputs("  InnoDB: Error: dict X latch held in "
+		      "srv_suspend_mysql_thread\n", stderr);
+		/* This should never occur. This incorrect handling
+		was added in the early development of
+		ha_innobase::add_index() in InnoDB Plugin 1.0. */
 		/* Release fast index creation latch */
 		row_mysql_unlock_data_dictionary(trx);
 		break;
@@ -1607,6 +1619,9 @@ srv_suspend_mysql_thread(
 		row_mysql_freeze_data_dictionary(trx);
 		break;
 	case RW_X_LATCH:
+		/* This should never occur. This incorrect handling
+		was added in the early development of
+		ha_innobase::add_index() in InnoDB Plugin 1.0. */
 		row_mysql_lock_data_dictionary(trx);
 		break;
 	}

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100819103637-objk0u6uvc6vj4m5.bundle
Thread
bzr commit into mysql-5.5-innodb branch (marko.makela:3168) Bug#56114marko.makela19 Aug