mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
A slave now can optionally register with the master providing the
info on how to connect to the slave for the clients that connect to the master, but would like to know where the slaves are include/mysql_com.h: register slaves mysql-test/mysql-test-run.sh: parameters to test slave registration mysql-test/r/rpl000002.result: test of slave registration mysql-test/t/rpl000002.test: test slave registration sql/mysql_priv.h: slave registration sql/mysqld.cc: slave registration sql/slave.cc: slave registration sql/slave.h: slave registration sql/sql_lex.h: slave registration sql/sql_parse.cc: slave registration sql/sql_repl.cc: slave registration sql/sql_repl.h: slave registration sql/sql_yacc.yy: slave registration
This commit is contained in:
@ -3,6 +3,16 @@
|
||||
|
||||
#include "slave.h"
|
||||
|
||||
typedef struct st_slave_info
|
||||
{
|
||||
uint32 server_id;
|
||||
char host[HOSTNAME_LENGTH+1];
|
||||
char user[USERNAME_LENGTH+1];
|
||||
char password[HASH_PASSWORD_LENGTH+1];
|
||||
uint16 port;
|
||||
} SLAVE_INFO;
|
||||
|
||||
extern HASH slave_list;
|
||||
extern char* master_host;
|
||||
extern my_string opt_bin_logname, master_info_file;
|
||||
extern uint32 server_id;
|
||||
@ -17,8 +27,12 @@ int stop_slave(THD* thd = 0, bool net_report = 1);
|
||||
int load_master_data(THD* thd);
|
||||
int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi);
|
||||
int change_master(THD* thd);
|
||||
int show_slave_hosts(THD* thd);
|
||||
void reset_slave();
|
||||
void reset_master();
|
||||
void init_slave_list();
|
||||
void end_slave_list();
|
||||
int register_slave(THD* thd, uchar* packet, uint packet_length);
|
||||
int purge_master_logs(THD* thd, const char* to_log);
|
||||
bool log_in_use(const char* log_name);
|
||||
void adjust_linfo_offsets(my_off_t purge_offset);
|
||||
|
Reference in New Issue
Block a user