~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/repl_failsafe.h

  • Committer: Monty Taylor
  • Date: 2008-09-16 00:00:48 UTC
  • mto: This revision was merged to the branch mainline in revision 391.
  • Revision ID: monty@inaugust.com-20080916000048-3rvrv3gv9l0ad3gs
Fixed copyright headers in drizzled/

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2008 Sun Microsystems
 
5
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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
 
18
 */
 
19
 
 
20
#ifdef HAVE_REPLICATION
 
21
 
 
22
#include <drizzled/server_includes.h>
 
23
 
 
24
typedef enum {RPL_AUTH_MASTER=0,RPL_ACTIVE_SLAVE,RPL_IDLE_SLAVE,
 
25
              RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
 
26
              RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
 
27
              RPL_ANY /* wild card used by change_rpl_status */ } RPL_STATUS;
 
28
extern RPL_STATUS rpl_status;
 
29
 
 
30
extern pthread_mutex_t LOCK_rpl_status;
 
31
extern pthread_cond_t COND_rpl_status;
 
32
extern TYPELIB rpl_role_typelib, rpl_status_typelib;
 
33
extern const char* rpl_role_type[], *rpl_status_type[];
 
34
 
 
35
pthread_handler_t handle_failsafe_rpl(void *arg);
 
36
void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status);
 
37
int find_recovery_captain(THD* thd, DRIZZLE *drizzle);
 
38
int update_slave_list(DRIZZLE *drizzle, Master_info* mi);
 
39
 
 
40
extern HASH slave_list;
 
41
 
 
42
bool load_master_data(THD* thd);
 
43
int connect_to_master(THD *thd, DRIZZLE *drizzle, Master_info* mi);
 
44
 
 
45
bool show_new_master(THD* thd);
 
46
bool show_slave_hosts(THD* thd);
 
47
int translate_master(THD* thd, LEX_MASTER_INFO* mi, char* errmsg);
 
48
void init_slave_list();
 
49
void end_slave_list();
 
50
int register_slave(THD* thd, uchar* packet, uint packet_length);
 
51
void unregister_slave(THD* thd, bool only_mine, bool need_mutex);
 
52
 
 
53
#endif /* HAVE_REPLICATION */