~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/slave.h

  • Committer: Brian Aker
  • Date: 2008-08-10 16:57:26 UTC
  • Revision ID: brian@tangent.org-20080810165726-mc1660l11a5vkv69
libdrizzle has ulong removed.

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
 
 */
 
1
/* Copyright (C) 2000-2003 MySQL AB
 
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 */
19
15
 
20
16
#ifndef DRIZZLE_SERVER_SLAVE_H
21
17
#define DRIZZLE_SERVER_SLAVE_H
37
33
*/
38
34
#define SLAVE_MAX_HEARTBEAT_PERIOD 4294967
39
35
 
 
36
#ifdef HAVE_REPLICATION
 
37
 
40
38
#include "log.h"
41
39
#include <mysys/my_list.h>
42
40
#include "rpl_filter.h"
95
93
  run_lock protects all information about the run state: slave_running, thd
96
94
  and the existence of the I/O thread to stop/start it, you need this mutex).
97
95
  data_lock protects some moving members of the struct: counters (log name,
98
 
  position) and relay log (DRIZZLE_BIN_LOG object).
 
96
  position) and relay log (MYSQL_BIN_LOG object).
99
97
 
100
98
  In Relay_log_info: run_lock, data_lock
101
99
  see Master_info
103
101
  Order of acquisition: if you want to have LOCK_active_mi and a run_lock, you
104
102
  must acquire LOCK_active_mi first.
105
103
 
106
 
  In DRIZZLE_BIN_LOG: LOCK_log, LOCK_index of the binlog and the relay log
 
104
  In MYSQL_BIN_LOG: LOCK_log, LOCK_index of the binlog and the relay log
107
105
  LOCK_log: when you write to it. LOCK_index: when you create/delete a binlog
108
106
  (so that you have to update the .index file).
109
107
*/
130
128
  I started with using an enum, but
131
129
  enum_variable=1; is not legal so would have required many line changes.
132
130
*/
133
 
#define DRIZZLE_SLAVE_NOT_RUN         0
134
 
#define DRIZZLE_SLAVE_RUN_NOT_CONNECT 1
135
 
#define DRIZZLE_SLAVE_RUN_CONNECT     2
 
131
#define MYSQL_SLAVE_NOT_RUN         0
 
132
#define MYSQL_SLAVE_RUN_NOT_CONNECT 1
 
133
#define MYSQL_SLAVE_RUN_CONNECT     2
136
134
 
137
135
#define RPL_LOG_NAME (rli->group_master_log_name[0] ? rli->group_master_log_name :\
138
136
 "FIRST")
225
223
       
226
224
extern I_List<THD> threads;
227
225
 
 
226
#endif /* HAVE_REPLICATION */
 
227
 
228
228
/* masks for start/stop operations on io and sql slave threads */
229
229
#define SLAVE_IO  1
230
230
#define SLAVE_SQL 2