~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/slave/replication_schema.h

  • Committer: pcrews
  • Date: 2011-05-24 17:36:24 UTC
  • mfrom: (1099.4.232 drizzle)
  • Revision ID: pcrews@lucid32-20110524173624-mwr1bvq6fa1r01ao
Updated translations + 2011.05.18 tarball tag

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) 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
 
 
21
#pragma once
 
22
 
 
23
#include <plugin/slave/sql_executor.h>
 
24
 
 
25
namespace slave
 
26
{
 
27
 
 
28
class ReplicationSchema : public SQLExecutor
 
29
{
 
30
public:
 
31
  ReplicationSchema() : SQLExecutor("slave", "replication")
 
32
  { }
 
33
 
 
34
  bool create();
 
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);
 
50
};
 
51
 
 
52
} /* namespace slave */
 
53