~drizzle-trunk/drizzle/development

2116.1.31 by David Shrewsbury
Major refactor of common functionality into new classes.
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2011 David Shrewsbury
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; either version 2 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 */
20
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
21
#pragma once
2116.1.31 by David Shrewsbury
Major refactor of common functionality into new classes.
22
2116.1.38 by David Shrewsbury
Change include style
23
#include <plugin/slave/sql_executor.h>
2116.1.31 by David Shrewsbury
Major refactor of common functionality into new classes.
24
25
namespace slave
26
{
27
28
class ReplicationSchema : public SQLExecutor
29
{
30
public:
31
  ReplicationSchema() : SQLExecutor("slave", "replication")
32
  { }
33
34
  bool create();
2225.3.1 by David Shrewsbury
Persist --slave.max-commit-id value to applier_state table.
35
36
  /**
37
   * Set initial value of the last applied COMMIT_ID value in applier_state.
38
   *
39
   * This is used when the server is started with --slave.max-commit-id to
40
   * begin reading from the master transaction log at a given point. This
41
   * method will persist the value to the applier_state table. If it wasn't
42
   * permanently stored immediately, we risk the possibility of losing the
43
   * value if the server is again restarted without ever having received
44
   * another event from the master (which causes persistence of the value).
45
   * An edge case, but still possible.
46
   *
47
   * @param[in] value The initial value.
48
   */
49
  bool setInitialMaxCommitId(uint64_t value);
2116.1.31 by David Shrewsbury
Major refactor of common functionality into new classes.
50
};
51
52
} /* namespace slave */
53