From ff5d306e296350e7489dd3decb01bad18d135411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 4 Dec 2020 19:02:58 +0200 Subject: MDEV-21452: Replace ib_mutex_t with mysql_mutex_t SHOW ENGINE INNODB MUTEX functionality is completely removed, as are the InnoDB latching order checks. We will enforce innodb_fatal_semaphore_wait_threshold only for dict_sys.mutex and lock_sys.mutex. dict_sys_t::mutex_lock(): A single entry point for dict_sys.mutex. lock_sys_t::mutex_lock(): A single entry point for lock_sys.mutex. FIXME: srv_sys should be removed altogether; it is duplicating tpool functionality. fil_crypt_threads_init(): To prevent SAFE_MUTEX warnings, we must not hold fil_system.mutex. fil_close_all_files(): To prevent SAFE_MUTEX warnings for fil_space_destroy_crypt_data(), we must not hold fil_system.mutex while invoking fil_space_free_low() on a detached tablespace. --- storage/innobase/buf/buf0buf.cc | 5 ++--- storage/innobase/buf/buf0dblwr.cc | 1 - storage/innobase/buf/buf0flu.cc | 4 ---- storage/innobase/buf/buf0lru.cc | 1 + 4 files changed, 3 insertions(+), 8 deletions(-) (limited to 'storage/innobase/buf') diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 04d48bbc217..d15794e2856 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -63,7 +63,6 @@ Created 11/5/1995 Heikki Tuuri #include "fil0pagecompress.h" #endif /* !UNIV_INNOCHECKSUM */ #include "page0zip.h" -#include "sync0sync.h" #include "buf0dump.h" #include #include @@ -2035,11 +2034,11 @@ withdraw_retry: message_interval *= 2; } - mysql_mutex_lock(&lock_sys.mutex); + lock_sys.mutex_lock(); bool found = false; trx_sys.trx_list.for_each(find_interesting_trx{ found, withdraw_started, current_time}); - mysql_mutex_unlock(&lock_sys.mutex); + lock_sys.mutex_unlock(); withdraw_started = current_time; } diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index c1d343be50a..c13e41b600d 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -29,7 +29,6 @@ Created 2011/12/19 #include "buf0checksum.h" #include "srv0start.h" #include "srv0srv.h" -#include "sync0sync.h" #include "page0zip.h" #include "trx0sys.h" #include "fil0crypt.h" diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index c92c3264535..07606cb682c 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -241,8 +241,6 @@ void buf_flush_remove_pages(ulint id) @return number dirty pages that there were for this tablespace */ ulint buf_flush_dirty_pages(ulint id) { - ut_ad(!sync_check_iterate(dict_sync_check())); - ulint n= 0; mysql_mutex_lock(&buf_pool.flush_list_mutex); @@ -2289,8 +2287,6 @@ ATTRIBUTE_COLD void buf_flush_buffer_pool() NOTE: The calling thread is not allowed to hold any buffer page latches! */ void buf_flush_sync() { - ut_ad(!sync_check_iterate(dict_sync_check())); - for (;;) { const ulint n_flushed= buf_flush_lists(srv_max_io_capacity, LSN_MAX); diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc index 020275850f2..3faba416ee4 100644 --- a/storage/innobase/buf/buf0lru.cc +++ b/storage/innobase/buf/buf0lru.cc @@ -37,6 +37,7 @@ Created 11/5/1995 Heikki Tuuri #include "log0recv.h" #include "srv0srv.h" #include "srv0mon.h" +#include "my_cpu.h" /** Flush this many pages in buf_LRU_get_free_block() */ size_t innodb_lru_flush_size; -- cgit v1.2.1