mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Adieu slave_list
slave_list was used to provide data for SHOW SLAVE HOSTS and Slaves_connected status variable. Introduced binlog_dump_thread_count which is exposed via Slaves_connected (replaces slave_list.records). Store Slave_info on THD and access it by iterating server_threads (replaces slave_list). Added: THD::slave_info binlog_dump_thread_count show_slave_hosts_callback() Removed: slave_list SLAVE_LIST_CHUNK SLAVE_ERRMSG_SIZE slave_list_key() slave_info_free() init_slave_list() end_slave_list() all_slave_list_mutexes init_all_slave_list_mutexes() key_LOCK_slave_list LOCK_slave_list Moved: SLAVE_INFO -> Slave_info register_slave() -> THD::register_slave() unregister_slave() -> THD::unregister_slave() Also removed redundant end_slave() from close_connections(): it is called again soon afterwards by clean_up(). Pre-requisite for clean MDEV-18450 solution.
This commit is contained in:
@ -642,6 +642,10 @@ THD::THD(my_thread_id id, bool is_wsrep_applier, bool skip_global_sys_var_lock)
|
||||
tdc_hash_pins(0),
|
||||
xid_hash_pins(0),
|
||||
m_tmp_tables_locked(false)
|
||||
#ifdef HAVE_REPLICATION
|
||||
,
|
||||
slave_info(0)
|
||||
#endif
|
||||
#ifdef WITH_WSREP
|
||||
,
|
||||
wsrep_applier(is_wsrep_applier),
|
||||
@ -1562,6 +1566,9 @@ void THD::cleanup(void)
|
||||
DBUG_ASSERT(!mdl_context.has_locks());
|
||||
|
||||
apc_target.destroy();
|
||||
#ifdef HAVE_REPLICATION
|
||||
unregister_slave();
|
||||
#endif
|
||||
cleanup_done=1;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
Reference in New Issue
Block a user