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:
@ -1654,7 +1654,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
case COM_REGISTER_SLAVE:
|
||||
{
|
||||
status_var_increment(thd->status_var.com_register_slave);
|
||||
if (!register_slave(thd, (uchar*)packet, packet_length))
|
||||
if (!thd->register_slave((uchar*) packet, packet_length))
|
||||
my_ok(thd);
|
||||
break;
|
||||
}
|
||||
@ -2094,7 +2094,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
general_log_print(thd, command, "Log: '%s' Pos: %lu", name, pos);
|
||||
if (nlen < FN_REFLEN)
|
||||
mysql_binlog_send(thd, thd->strmake(name, nlen), (my_off_t)pos, flags);
|
||||
unregister_slave(thd,1,1);
|
||||
thd->unregister_slave();
|
||||
/* fake COM_QUIT -- if we get here, the thread needs to terminate */
|
||||
error = TRUE;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user