diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-22 12:48:40 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-22 12:48:40 +0300 |
commit | c009ce7dd085b55b27cc6d9d4bfe3519f88e477f (patch) | |
tree | a398b0bf23e5539d8734b5111bc0f8b9db82a90e /storage/innobase/srv/srv0srv.cc | |
parent | 620c55e708b9ea94ef8ba309267a6f2f32ed8104 (diff) | |
download | mariadb-git-c009ce7dd085b55b27cc6d9d4bfe3519f88e477f.tar.gz |
MDEV-27094 Debug builds include useless InnoDB "disabled" options
This is a backport of commit 4489a89c71ea78f2562159ca0303fbb83da5baa0
in order to remove the test innodb.redo_log_during_checkpoint
that would cause trouble in the DBUG subsystem invoked by
safe_mutex_lock() via log_checkpoint(). Before
commit 7cffb5f6e8a231a041152447be8980ce35d2c9b8
these mutexes were of different type.
The following options were introduced in
commit 2e814d4702d71a04388386a9f591d14a35980bfe (mariadb-10.2.2)
and have little use:
innodb_disable_resize_buffer_pool_debug had no effect even in
MariaDB 10.2.2 or MySQL 5.7.9. It was introduced in
mysql/mysql-server@5c4094cf4971eebab89da4ee4ae92c71f69cd524
to work around a problem that was fixed in
mysql/mysql-server@2957ae4f990bf3aed25822b0ce15d3ccad0b54b6
(but the parameter was not removed).
innodb_page_cleaner_disabled_debug and innodb_master_thread_disabled_debug
are only used by the test innodb.redo_log_during_checkpoint
that will be removed as part of this commit.
innodb_dict_stats_disabled_debug is only used by that test,
and it is redundant because one could simply use
innodb_stats_persistent=OFF or the STATS_PERSISTENT=0 attribute
of the table in the test to achieve the same effect.
Diffstat (limited to 'storage/innobase/srv/srv0srv.cc')
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index a308839ce4f..7ae557881a1 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -148,13 +148,6 @@ my_bool srv_use_atomic_writes; /** innodb_compression_algorithm; used with page compression */ ulong innodb_compression_algorithm; -#ifdef UNIV_DEBUG -/** Used by SET GLOBAL innodb_master_thread_disabled_debug = X. */ -my_bool srv_master_thread_disabled_debug; -/** Event used to inform that master thread is disabled. */ -static os_event_t srv_master_thread_disabled_event; -#endif /* UNIV_DEBUG */ - /*------------------------- LOG FILES ------------------------ */ char* srv_log_group_home_dir; @@ -659,7 +652,6 @@ static void srv_init() } need_srv_free = true; - ut_d(srv_master_thread_disabled_event = os_event_create(0)); /* page_zip_stat_per_index_mutex is acquired from: 1. page_zip_compress() (after SYNC_FSP) @@ -692,8 +684,6 @@ srv_free(void) mutex_free(&srv_sys.tasks_mutex); } - ut_d(os_event_destroy(srv_master_thread_disabled_event)); - trx_i_s_cache_free(trx_i_s_cache); srv_thread_pool_end(); } @@ -1552,54 +1542,6 @@ srv_shutdown_print_master_pending( } } -#ifdef UNIV_DEBUG -/** Waits in loop as long as master thread is disabled (debug) */ -static -void -srv_master_do_disabled_loop(void) -{ - if (!srv_master_thread_disabled_debug) { - /* We return here to avoid changing op_info. */ - return; - } - - srv_main_thread_op_info = "disabled"; - - while (srv_master_thread_disabled_debug) { - os_event_set(srv_master_thread_disabled_event); - if (srv_shutdown_state != SRV_SHUTDOWN_NONE) { - break; - } - os_thread_sleep(100000); - } - - srv_main_thread_op_info = ""; -} - -/** Disables master thread. It's used by: - SET GLOBAL innodb_master_thread_disabled_debug = 1 (0). -@param[in] save immediate result from check function */ -void -srv_master_thread_disabled_debug_update(THD*, st_mysql_sys_var*, void*, - const void* save) -{ - /* This method is protected by mutex, as every SET GLOBAL .. */ - ut_ad(srv_master_thread_disabled_event != NULL); - - const bool disable = *static_cast<const my_bool*>(save); - - const int64_t sig_count = os_event_reset( - srv_master_thread_disabled_event); - - srv_master_thread_disabled_debug = disable; - - if (disable) { - os_event_wait_low( - srv_master_thread_disabled_event, sig_count); - } -} -#endif /* UNIV_DEBUG */ - /*********************************************************************//** Perform the tasks that the master thread is supposed to do when the server is active. There are two types of tasks. The first category is @@ -1630,8 +1572,6 @@ srv_master_do_active_tasks(void) MONITOR_INC_TIME_IN_MICRO_SECS( MONITOR_SRV_BACKGROUND_DROP_TABLE_MICROSECOND, counter_time); - ut_d(srv_master_do_disabled_loop()); - if (srv_shutdown_state > SRV_SHUTDOWN_INITIATED) { return; } @@ -1694,8 +1634,6 @@ srv_master_do_idle_tasks(void) MONITOR_SRV_BACKGROUND_DROP_TABLE_MICROSECOND, counter_time); - ut_d(srv_master_do_disabled_loop()); - if (srv_shutdown_state > SRV_SHUTDOWN_INITIATED) { return; } |