List:Commits« Previous MessageNext Message »
From:marko.makela Date:January 19 2011 12:13pm
Subject:bzr commit into mysql-trunk-innodb branch (marko.makela:3441) WL#5458
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.6-innodb/ based on revid:marko.makela@strippedbgirk1c4t6d3

 3441 Marko Mäkelä	2011-01-19
      Make UNIV_SYNC_DEBUG a notch stricter after WL#5458.
      
      srv_init(): Assign a latch level to srv_sys->tasks_mutex.
      
      sync_thread_add_level(): Assert that the thread must own the lock_sys->mutex
      in order to be able to acquire multiple trx->mutex.

    modified:
      storage/innobase/srv/srv0srv.c
      storage/innobase/sync/sync0sync.c
=== modified file 'storage/innobase/srv/srv0srv.c'
--- a/storage/innobase/srv/srv0srv.c	revid:marko.makela@stripped
+++ b/storage/innobase/srv/srv0srv.c	revid:marko.makela@oracle.com-20110119121347-j6uhwoi0jjge8din
@@ -931,7 +931,7 @@ srv_init(void)
 	mutex_create(srv_sys_mutex_key, &srv_sys->mutex, SYNC_THREADS);
 
 	mutex_create(srv_sys_tasks_mutex_key,
-		     &srv_sys->tasks_mutex, SYNC_NO_ORDER_CHECK);
+		     &srv_sys->tasks_mutex, SYNC_ANY_LATCH);
 
 	srv_sys->sys_threads = (srv_slot_t*) &srv_sys[1];
 

=== modified file 'storage/innobase/sync/sync0sync.c'
--- a/storage/innobase/sync/sync0sync.c	revid:marko.makela@oracle.com-20110119112245-e0zpbgirk1c4t6d3
+++ b/storage/innobase/sync/sync0sync.c	revid:marko.makela@stripped119121347-j6uhwoi0jjge8din
@@ -1198,6 +1198,13 @@ sync_thread_add_level(
 		}
 		break;
 	case SYNC_TRX:
+		/* Either the thread must own the lock_sys->mutex, or
+		it is allowed to own only ONE trx->mutex. */
+		if (!sync_thread_levels_g(array, level, FALSE)) {
+			ut_a(sync_thread_levels_g(array, level - 1, TRUE));
+			ut_a(sync_thread_levels_contain(array, SYNC_LOCK_SYS));
+		}
+		break;
 	case SYNC_BUF_FLUSH_LIST:
 	case SYNC_BUF_POOL:
 		/* We can have multiple mutexes of this type therefore we

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110119121347-j6uhwoi0jjge8din.bundle
Thread
bzr commit into mysql-trunk-innodb branch (marko.makela:3441) WL#5458marko.makela19 Jan