~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/replication/replication.h

  • Committer: Monty Taylor
  • Date: 2009-01-09 07:02:24 UTC
  • mto: (779.1.2 devel)
  • mto: This revision was merged to the branch mainline in revision 784.
  • Revision ID: mordred@inaugust.com-20090109070224-prwl5p52mfql3zfw
Split out readline.

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
#ifndef DRIZZLED_REPLICATION_REPLICATION_H
 
21
#define DRIZZLED_REPLICATION_REPLICATION_H
 
22
 
 
23
#include <libdrizzle/libdrizzle.h>
 
24
#include <mysys/hash.h>
 
25
 
 
26
 
 
27
#include <drizzled/slave.h>
 
28
 
 
29
typedef struct st_slave_info
 
30
{
 
31
  uint32_t server_id;
 
32
  uint32_t rpl_recovery_rank, master_id;
 
33
  char host[HOSTNAME_LENGTH+1];
 
34
  char user[USERNAME_LENGTH+1];
 
35
  char password[MAX_PASSWORD_LENGTH+1];
 
36
  uint16_t port;
 
37
  Session* session;
 
38
} SLAVE_INFO;
 
39
 
 
40
extern bool opt_show_slave_auth_info;
 
41
extern char *master_host, *master_info_file;
 
42
extern bool server_id_supplied;
 
43
 
 
44
extern int max_binlog_dump_events;
 
45
 
 
46
int start_slave(Session* session, Master_info* mi, bool net_report);
 
47
int stop_slave(Session* session, Master_info* mi, bool net_report);
 
48
bool change_master(Session* session, Master_info* mi);
 
49
bool mysql_show_binlog_events(Session* session);
 
50
int cmp_master_pos(const char* log_file_name1, uint64_t log_pos1,
 
51
                   const char* log_file_name2, uint64_t log_pos2);
 
52
int reset_slave(Session *session, Master_info* mi);
 
53
int reset_master(Session* session);
 
54
bool purge_master_logs(Session* session, const char* to_log);
 
55
bool purge_master_logs_before_date(Session* session, time_t purge_time);
 
56
bool log_in_use(const char* log_name);
 
57
void adjust_linfo_offsets(my_off_t purge_offset);
 
58
bool show_binlogs(Session* session);
 
59
void kill_zombie_dump_threads(uint32_t slave_server_id);
 
60
int check_binlog_magic(IO_CACHE* log, const char** errmsg);
 
61
 
 
62
typedef struct st_load_file_info
 
63
{
 
64
  Session* session;
 
65
  my_off_t last_pos_in_file;
 
66
  bool wrote_create_file, log_delayed;
 
67
} LOAD_FILE_INFO;
 
68
 
 
69
int log_loaded_block(IO_CACHE* file);
 
70
int init_replication_sys_vars();
 
71
 
 
72
void mysql_binlog_send(Session* session, char* log_ident, my_off_t pos, uint16_t flags);
 
73
 
 
74
#endif /* DRIZZLED_REPLICATION_REPLICATION_H */