List:Commits« Previous MessageNext Message »
From:marko.makela Date:August 19 2010 10:50am
Subject:bzr push into mysql-5.5-innodb branch (marko.makela:3167 to 3168) Bug#56114
View as plain text  
 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
 3167 Jimmy Yang	2010-08-18
      Bug #48026 Log start and end of InnoDB buffer pool initialization to
      the error log

    modified:
      storage/innobase/srv/srv0start.c
=== modified file 'storage/innobase/srv/srv0srv.c'
--- a/storage/innobase/srv/srv0srv.c	revid:jimmy.yang@stripped00819041647-wx9t9jtukdtb23jv
+++ b/storage/innobase/srv/srv0srv.c	revid:marko.makela@strippedk0u6uvc6vj4m5
@@ -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 push into mysql-5.5-innodb branch (marko.makela:3167 to 3168) Bug#56114marko.makela19 Aug