summaryrefslogtreecommitdiff
path: root/storage/innobase/buf/buf0flu.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2011-04-05 10:18:43 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2011-04-05 10:18:43 +0300
commit6fe99e2dda90ba8b579ca76217606c9f8a630916 (patch)
tree322bef353e61a2df4cce107fc16cabffaefbacef /storage/innobase/buf/buf0flu.c
parentd8ddf751cd156643326918c1cb4ee2e1a9c22381 (diff)
downloadmariadb-git-6fe99e2dda90ba8b579ca76217606c9f8a630916.tar.gz
Bug 12323643 - CLEAN UP THE INNODB THREAD SHUTDOWN AND ASSERTIONS (WL#5136)
Remove most references to thread id in InnoDB. Three references remain: the current holder of a mutex, and the current x-lock holder of a rw-lock, and some references in UNIV_SYNC_DEBUG checks. This allows MySQL to change the thread associated to a client connection. Tighten the UNIV_SYNC_DEBUG checks, trying to ensure that no InnoDB mutex or x-lock is being held when returning control to MySQL. The only semaphore that may be held is the btr_search_latch in shared mode. sync_thread_levels_empty_except_dict(): A wrapper for sync_thread_levels_empty_gen(TRUE). sync_thread_levels_nonempty_trx(): Check that the current thread is not holding any InnoDB semaphores, except btr_search_latch if trx->has_search_latch. sync_thread_levels_empty(): Unused function; remove. trx_t: Remove mysql_thread_id and mysql_process_no. srv_slot_t: Remove id and handle. row_search_for_mysql(), srv_conc_enter_innodb(), srv_conc_force_enter_innodb(), srv_conc_force_exit_innodb(), srv_conc_exit_innodb(), srv_suspend_mysql_thread: Assert !sync_thread_levels_nonempty_trx(). rb:634 approved by Sunny Bains
Diffstat (limited to 'storage/innobase/buf/buf0flu.c')
-rw-r--r--storage/innobase/buf/buf0flu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c
index 07a32e55f97..ebe96a82a10 100644
--- a/storage/innobase/buf/buf0flu.c
+++ b/storage/innobase/buf/buf0flu.c
@@ -1716,7 +1716,7 @@ buf_flush_batch(
ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST);
#ifdef UNIV_SYNC_DEBUG
ut_ad((flush_type != BUF_FLUSH_LIST)
- || sync_thread_levels_empty_gen(TRUE));
+ || sync_thread_levels_empty_except_dict());
#endif /* UNIV_SYNC_DEBUG */
buf_pool_mutex_enter(buf_pool);