summaryrefslogtreecommitdiff
path: root/storage/innobase/srv/srv0srv.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/srv/srv0srv.cc')
-rw-r--r--storage/innobase/srv/srv0srv.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 3da92d48feb..9d19a14cb66 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -2518,6 +2518,13 @@ DECLARE_THREAD(srv_worker_thread)(
slot = srv_reserve_slot(SRV_WORKER);
+#ifdef UNIV_DEBUG
+ UT_LIST_INIT(slot->debug_sync,
+ &srv_slot_t::debug_sync_t::debug_sync_list);
+ rw_lock_create(PFS_NOT_INSTRUMENTED, &slot->debug_sync_lock,
+ SYNC_NO_ORDER_CHECK);
+#endif
+
ut_a(srv_n_purge_threads > 1);
ut_a(ulong(my_atomic_loadlint(&srv_sys.n_threads_active[SRV_WORKER]))
< srv_n_purge_threads);
@@ -2539,6 +2546,8 @@ DECLARE_THREAD(srv_worker_thread)(
}
} while (purge_sys.enabled());
+ ut_d(rw_lock_free(&slot->debug_sync_lock));
+
srv_free_slot(slot);
ut_ad(!purge_sys.enabled());
@@ -2739,6 +2748,12 @@ DECLARE_THREAD(srv_purge_coordinator_thread)(
slot = srv_reserve_slot(SRV_PURGE);
+#ifdef UNIV_DEBUG
+ UT_LIST_INIT(slot->debug_sync,
+ &srv_slot_t::debug_sync_t::debug_sync_list);
+ rw_lock_create(PFS_NOT_INSTRUMENTED, &slot->debug_sync_lock,
+ SYNC_NO_ORDER_CHECK);
+#endif
ulint rseg_history_len = trx_sys.history_size();
do {
@@ -2767,6 +2782,8 @@ DECLARE_THREAD(srv_purge_coordinator_thread)(
shutdown state. */
ut_a(srv_get_task_queue_length() == 0);
+ ut_d(rw_lock_free(&slot->debug_sync_lock));
+
srv_free_slot(slot);
/* Note that we are shutting down. */