~drizzle-trunk/drizzle/development

390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
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
 */
1 by brian
clean slate
19
20
#include "rpl_filter.h"
21
22
#include "slave.h"
23
24
typedef struct st_slave_info
25
{
205 by Brian Aker
uint32 -> uin32_t
26
  uint32_t server_id;
27
  uint32_t rpl_recovery_rank, master_id;
1 by brian
clean slate
28
  char host[HOSTNAME_LENGTH+1];
29
  char user[USERNAME_LENGTH+1];
30
  char password[MAX_PASSWORD_LENGTH+1];
206 by Brian Aker
Removed final uint dead types.
31
  uint16_t port;
520.1.22 by Brian Aker
Second pass of thd cleanup
32
  Session* session;
1 by brian
clean slate
33
} SLAVE_INFO;
34
150 by Brian Aker
More bool removal. More cow bell!
35
extern bool opt_show_slave_auth_info;
1 by brian
clean slate
36
extern char *master_host, *master_info_file;
37
extern bool server_id_supplied;
38
39
extern int max_binlog_dump_events;
40
520.1.22 by Brian Aker
Second pass of thd cleanup
41
int start_slave(Session* session, Master_info* mi, bool net_report);
42
int stop_slave(Session* session, Master_info* mi, bool net_report);
43
bool change_master(Session* session, Master_info* mi);
44
bool mysql_show_binlog_events(Session* session);
151 by Brian Aker
Ulonglong to uint64_t
45
int cmp_master_pos(const char* log_file_name1, uint64_t log_pos1,
46
		   const char* log_file_name2, uint64_t log_pos2);
520.1.22 by Brian Aker
Second pass of thd cleanup
47
int reset_slave(Session *session, Master_info* mi);
48
int reset_master(Session* session);
49
bool purge_master_logs(Session* session, const char* to_log);
50
bool purge_master_logs_before_date(Session* session, time_t purge_time);
1 by brian
clean slate
51
bool log_in_use(const char* log_name);
52
void adjust_linfo_offsets(my_off_t purge_offset);
520.1.22 by Brian Aker
Second pass of thd cleanup
53
bool show_binlogs(Session* session);
205 by Brian Aker
uint32 -> uin32_t
54
void kill_zombie_dump_threads(uint32_t slave_server_id);
1 by brian
clean slate
55
int check_binlog_magic(IO_CACHE* log, const char** errmsg);
56
57
typedef struct st_load_file_info
58
{
520.1.22 by Brian Aker
Second pass of thd cleanup
59
  Session* session;
1 by brian
clean slate
60
  my_off_t last_pos_in_file;
61
  bool wrote_create_file, log_delayed;
62
} LOAD_FILE_INFO;
63
64
int log_loaded_block(IO_CACHE* file);
65
int init_replication_sys_vars();