summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.h
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-03-02 00:41:33 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-03-06 17:06:09 +0400
commit2b711d231aed7b72f0895828f87bdd2f780c335a (patch)
treeac9078ed9dcc37b17191346a213661d4774bfb49 /sql/repl_failsafe.h
parent68c765d3137c5415b297831bd1906416ffd58b1e (diff)
downloadmariadb-git-2b711d231aed7b72f0895828f87bdd2f780c335a.tar.gz
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.
Diffstat (limited to 'sql/repl_failsafe.h')
-rw-r--r--sql/repl_failsafe.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/sql/repl_failsafe.h b/sql/repl_failsafe.h
index 967d81bcf0d..7f81b98303e 100644
--- a/sql/repl_failsafe.h
+++ b/sql/repl_failsafe.h
@@ -22,6 +22,7 @@
#include <my_sys.h>
#include "slave.h"
+extern Atomic_counter<uint32_t> binlog_dump_thread_count;
typedef enum {RPL_AUTH_MASTER=0,RPL_IDLE_SLAVE,RPL_ACTIVE_SLAVE,
RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
@@ -36,13 +37,7 @@ extern const char* rpl_role_type[], *rpl_status_type[];
void change_rpl_status(ulong from_status, ulong to_status);
int find_recovery_captain(THD* thd, MYSQL* mysql);
-extern HASH slave_list;
-
bool show_slave_hosts(THD* thd);
-void init_slave_list();
-void end_slave_list();
-int register_slave(THD* thd, uchar* packet, size_t packet_length);
-void unregister_slave(THD* thd, bool only_mine, bool need_mutex);
#endif /* HAVE_REPLICATION */
#endif /* REPL_FAILSAFE_INCLUDED */