My Project
|
00001 #ifndef RPL_MASTER_H_INCLUDED 00002 /* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. 00003 00004 This program is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation; version 2 of the License. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software Foundation, 00015 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 00016 00017 00018 #define RPL_MASTER_H_INCLUDED 00019 00020 00021 #ifdef HAVE_REPLICATION 00022 00023 extern bool server_id_supplied; 00024 extern int max_binlog_dump_events; 00025 extern my_bool opt_sporadic_binlog_dump_fail; 00026 extern my_bool opt_show_slave_auth_info; 00027 00028 typedef struct st_slave_info 00029 { 00030 uint32 server_id; 00031 uint32 rpl_recovery_rank, master_id; 00032 char host[HOSTNAME_LENGTH+1]; 00033 char user[USERNAME_LENGTH+1]; 00034 char password[MAX_PASSWORD_LENGTH+1]; 00035 uint16 port; 00036 THD* thd; 00037 } SLAVE_INFO; 00038 00039 void init_slave_list(); 00040 void end_slave_list(); 00041 int register_slave(THD* thd, uchar* packet, uint packet_length); 00042 void unregister_slave(THD* thd, bool only_mine, bool need_lock_slave_list); 00043 bool show_slave_hosts(THD* thd); 00044 String *get_slave_uuid(THD *thd, String *value); 00045 bool show_master_status(THD* thd); 00046 bool show_binlogs(THD* thd); 00047 void kill_zombie_dump_threads(String *slave_uuid); 00048 00060 bool com_binlog_dump_gtid(THD *thd, char *packet, uint packet_length); 00061 00073 bool com_binlog_dump(THD *thd, char *packet, uint packet_length); 00074 00098 void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, 00099 const Gtid_set* gtid_set, int flags); 00100 00101 int reset_master(THD* thd); 00102 00103 #endif /* HAVE_REPLICATION */ 00104 00105 #endif /* RPL_MASTER_H_INCLUDED */