~drizzle-trunk/drizzle/development

« back to all changes in this revision

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