~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/slave/replication_schema.cc

  • Committer: David Shrewsbury
  • Date: 2011-03-09 17:10:06 UTC
  • mto: (2228.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2229.
  • Revision ID: shrewsbury.dave@gmail.com-20110309171006-ld90oph01m3rex5k
Persist --slave.max-commit-id value to applier_state table.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/sql/result_set.h>
25
25
#include <string>
26
26
#include <vector>
 
27
#include <boost/lexical_cast.hpp>
27
28
 
28
29
using namespace std;
29
30
using namespace drizzled;
 
31
using namespace boost;
30
32
 
31
33
namespace slave
32
34
{
130
132
  return true;
131
133
}
132
134
 
 
135
bool ReplicationSchema::setInitialMaxCommitId(uint64_t value)
 
136
{
 
137
  vector<string> sql;
 
138
 
 
139
  sql.push_back("UPDATE `sys_replication`.`applier_state`"
 
140
                " SET `last_applied_commit_id` = "
 
141
                + lexical_cast<string>(value));
 
142
 
 
143
  return executeSQL(sql);
 
144
}
 
145
 
133
146
} /* namespace slave */