1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
#include <drizzled/server_includes.h>
1
/* Copyright (C) 2001-2005 MySQL AB & Sasha
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
#ifdef HAVE_REPLICATION
22
22
typedef enum {RPL_AUTH_MASTER=0,RPL_ACTIVE_SLAVE,RPL_IDLE_SLAVE,
23
23
RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
33
33
pthread_handler_t handle_failsafe_rpl(void *arg);
34
34
void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status);
35
int find_recovery_captain(THD* thd, DRIZZLE *drizzle);
36
int update_slave_list(DRIZZLE *drizzle, Master_info* mi);
35
int find_recovery_captain(THD* thd, MYSQL* mysql);
36
int update_slave_list(MYSQL* mysql, Master_info* mi);
38
38
extern HASH slave_list;
40
40
bool load_master_data(THD* thd);
41
int connect_to_master(THD *thd, DRIZZLE *drizzle, Master_info* mi);
41
int connect_to_master(THD *thd, MYSQL* mysql, Master_info* mi);
43
43
bool show_new_master(THD* thd);
44
44
bool show_slave_hosts(THD* thd);
45
45
int translate_master(THD* thd, LEX_MASTER_INFO* mi, char* errmsg);
46
46
void init_slave_list();
47
47
void end_slave_list();
48
int register_slave(THD* thd, unsigned char* packet, uint32_t packet_length);
48
int register_slave(THD* thd, uchar* packet, uint packet_length);
49
49
void unregister_slave(THD* thd, bool only_mine, bool need_mutex);
51
#endif /* HAVE_REPLICATION */