~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
/* Copyright (C) 2001-2005 MySQL AB & Sasha
2
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.
6
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.
11
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 */
15
16
#ifdef HAVE_REPLICATION
17
243.1.17 by Jay Pipes
FINAL PHASE removal of mysql_priv.h (Bye, bye my friend.)
18
#include <drizzled/server_includes.h>
1 by brian
clean slate
19
20
typedef enum {RPL_AUTH_MASTER=0,RPL_ACTIVE_SLAVE,RPL_IDLE_SLAVE,
21
	      RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
22
	      RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
23
	      RPL_ANY /* wild card used by change_rpl_status */ } RPL_STATUS;
24
extern RPL_STATUS rpl_status;
25
26
extern pthread_mutex_t LOCK_rpl_status;
27
extern pthread_cond_t COND_rpl_status;
28
extern TYPELIB rpl_role_typelib, rpl_status_typelib;
29
extern const char* rpl_role_type[], *rpl_status_type[];
30
31
pthread_handler_t handle_failsafe_rpl(void *arg);
32
void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status);
206.3.1 by Patrick Galbraith
Most everything working with client rename
33
int find_recovery_captain(THD* thd, DRIZZLE *drizzle);
34
int update_slave_list(DRIZZLE *drizzle, Master_info* mi);
1 by brian
clean slate
35
36
extern HASH slave_list;
37
38
bool load_master_data(THD* thd);
206.3.1 by Patrick Galbraith
Most everything working with client rename
39
int connect_to_master(THD *thd, DRIZZLE *drizzle, Master_info* mi);
1 by brian
clean slate
40
41
bool show_new_master(THD* thd);
42
bool show_slave_hosts(THD* thd);
43
int translate_master(THD* thd, LEX_MASTER_INFO* mi, char* errmsg);
44
void init_slave_list();
45
void end_slave_list();
46
int register_slave(THD* thd, uchar* packet, uint packet_length);
47
void unregister_slave(THD* thd, bool only_mine, bool need_mutex);
48
49
#endif /* HAVE_REPLICATION */