2000-10-02 05:28:21 +02:00
|
|
|
#ifndef SQL_REPL_H
|
|
|
|
#define SQL_REPL_H
|
|
|
|
|
2000-11-11 22:50:39 +01:00
|
|
|
#include "slave.h"
|
|
|
|
|
2001-05-31 02:50:56 +02:00
|
|
|
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;
|
|
|
|
|
2001-06-02 05:15:15 +02:00
|
|
|
extern bool opt_show_slave_auth_info;
|
2001-05-31 02:50:56 +02:00
|
|
|
extern HASH slave_list;
|
2000-10-02 05:28:21 +02:00
|
|
|
extern char* master_host;
|
|
|
|
extern my_string opt_bin_logname, master_info_file;
|
2000-12-08 20:50:57 +01:00
|
|
|
extern uint32 server_id;
|
|
|
|
extern bool server_id_supplied;
|
2000-10-02 05:28:21 +02:00
|
|
|
extern I_List<i_string> binlog_do_db, binlog_ignore_db;
|
|
|
|
|
2001-06-29 02:22:29 +02:00
|
|
|
#ifndef DBUG_OFF
|
|
|
|
extern int max_binlog_dump_events;
|
|
|
|
extern bool opt_sporadic_binlog_dump_fail;
|
|
|
|
#endif
|
|
|
|
|
2001-04-25 01:39:26 +02:00
|
|
|
File open_binlog(IO_CACHE *log, const char *log_file_name,
|
|
|
|
const char **errmsg);
|
|
|
|
|
2000-10-02 05:28:21 +02:00
|
|
|
int start_slave(THD* thd = 0, bool net_report = 1);
|
|
|
|
int stop_slave(THD* thd = 0, bool net_report = 1);
|
2001-05-29 03:18:23 +02:00
|
|
|
int load_master_data(THD* thd);
|
|
|
|
int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi);
|
2000-10-02 05:28:21 +02:00
|
|
|
int change_master(THD* thd);
|
2001-05-31 02:50:56 +02:00
|
|
|
int show_slave_hosts(THD* thd);
|
2001-06-21 21:19:24 +02:00
|
|
|
int show_binlog_events(THD* thd);
|
2000-10-02 05:28:21 +02:00
|
|
|
void reset_slave();
|
|
|
|
void reset_master();
|
2001-05-31 02:50:56 +02:00
|
|
|
void init_slave_list();
|
|
|
|
void end_slave_list();
|
|
|
|
int register_slave(THD* thd, uchar* packet, uint packet_length);
|
2000-10-27 06:11:55 +02:00
|
|
|
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);
|
|
|
|
int show_binlogs(THD* thd);
|
2000-10-02 05:28:21 +02:00
|
|
|
extern int init_master_info(MASTER_INFO* mi);
|
|
|
|
void kill_zombie_dump_threads(uint32 slave_server_id);
|
|
|
|
|
|
|
|
#endif
|