MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rpl_master.h
1 #ifndef RPL_MASTER_H_INCLUDED
2 /* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software Foundation,
15  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
16 
17 
18 #define RPL_MASTER_H_INCLUDED
19 
20 
21 #ifdef HAVE_REPLICATION
22 
23 extern bool server_id_supplied;
24 extern int max_binlog_dump_events;
25 extern my_bool opt_sporadic_binlog_dump_fail;
26 extern my_bool opt_show_slave_auth_info;
27 
28 typedef struct st_slave_info
29 {
30  uint32 server_id;
31  uint32 rpl_recovery_rank, master_id;
32  char host[HOSTNAME_LENGTH+1];
33  char user[USERNAME_LENGTH+1];
34  char password[MAX_PASSWORD_LENGTH+1];
35  uint16 port;
36  THD* thd;
37 } SLAVE_INFO;
38 
39 void init_slave_list();
40 void end_slave_list();
41 int register_slave(THD* thd, uchar* packet, uint packet_length);
42 void unregister_slave(THD* thd, bool only_mine, bool need_lock_slave_list);
43 bool show_slave_hosts(THD* thd);
44 String *get_slave_uuid(THD *thd, String *value);
45 bool show_master_status(THD* thd);
46 bool show_binlogs(THD* thd);
47 void kill_zombie_dump_threads(String *slave_uuid);
48 
60 bool com_binlog_dump_gtid(THD *thd, char *packet, uint packet_length);
61 
73 bool com_binlog_dump(THD *thd, char *packet, uint packet_length);
74 
98 void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
99  const Gtid_set* gtid_set);
100 
101 int reset_master(THD* thd);
102 
103 #endif /* HAVE_REPLICATION */
104 
105 #endif /* RPL_MASTER_H_INCLUDED */