List:Commits« Previous MessageNext Message »
From:marko.makela Date:April 12 2011 7:54am
Subject:bzr commit into mysql-trunk-innodb branch (marko.makela:3575)
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.6-innodb/ based on revid:sunny.bains@strippedq5x283ub8f6

 3575 Marko Mäkelä	2011-04-12 [merge]
      Merge mysql-5.5-innodb to mysql-trunk-innodb.

    modified:
      storage/innobase/lock/lock0wait.c
      storage/innobase/que/que0que.c
=== modified file 'storage/innobase/lock/lock0wait.c'
--- a/storage/innobase/lock/lock0wait.c	revid:sunny.bains@strippedx283ub8f6
+++ b/storage/innobase/lock/lock0wait.c	revid:marko.makela@stripped
@@ -209,7 +209,7 @@ lock_wait_suspend_thread(
 	double		wait_time;
 	trx_t*		trx;
 	ulint		had_dict_lock;
-	ibool		was_declared_inside_innodb	= FALSE;
+	ibool		was_declared_inside_innodb;
 	ib_int64_t	start_time			= 0;
 	ib_int64_t	finish_time;
 	ulint		sec;
@@ -270,17 +270,6 @@ lock_wait_suspend_thread(
 	lock_wait_mutex_exit();
 	trx_mutex_exit(trx);
 
-	if (trx->declared_to_be_inside_innodb) {
-
-		was_declared_inside_innodb = TRUE;
-
-		/* We must declare this OS thread to exit InnoDB, since a
-		possible other thread holding a lock which this thread waits
-		for must be allowed to enter, sooner or later */
-
-		srv_conc_force_exit_innodb(trx);
-	}
-
 	had_dict_lock = trx->dict_operation_lock_mode;
 
 	switch (had_dict_lock) {
@@ -304,17 +293,21 @@ lock_wait_suspend_thread(
 
 	/* Suspend this thread and wait for the event. */
 
-	ut_ad(!trx_mutex_own(trx));
+	was_declared_inside_innodb = trx->declared_to_be_inside_innodb;
+
+	if (was_declared_inside_innodb) {
+		/* We must declare this OS thread to exit InnoDB, since a
+		possible other thread holding a lock which this thread waits
+		for must be allowed to enter, sooner or later */
+
+		srv_conc_force_exit_innodb(trx);
+	}
+
 	os_event_wait(slot->event);
 
 	/* After resuming, reacquire the data dictionary latch if
 	necessary. */
 
-	if (had_dict_lock) {
-
-		row_mysql_freeze_data_dictionary(trx);
-	}
-
 	if (was_declared_inside_innodb) {
 
 		/* Return back inside InnoDB */
@@ -322,6 +315,11 @@ lock_wait_suspend_thread(
 		srv_conc_force_enter_innodb(trx);
 	}
 
+	if (had_dict_lock) {
+
+		row_mysql_freeze_data_dictionary(trx);
+	}
+
 	wait_time = ut_difftime(ut_time(), slot->suspend_time);
 
 	/* Release the slot for others to use */

=== modified file 'storage/innobase/que/que0que.c'
--- a/storage/innobase/que/que0que.c	revid:sunny.bains@stripped
+++ b/storage/innobase/que/que0que.c	revid:marko.makela@stripped0110412075347-3r2u26m6iefjrg4e
@@ -1216,9 +1216,6 @@ loop:
 		goto loop;
 
 	case QUE_THR_LOCK_WAIT:
-		/* The ..._mysql_... function works also for InnoDB's
-		internal threads. Let us wait that the lock wait ends. */
-
 		lock_wait_suspend_thread(thr);
 
 		trx_mutex_enter(thr_get_trx(thr));

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110412075347-3r2u26m6iefjrg4e.bundle
Thread
bzr commit into mysql-trunk-innodb branch (marko.makela:3575) marko.makela12 Apr