~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/slave/queue_consumer.cc

  • Committer: David Shrewsbury
  • Date: 2011-02-23 16:49:25 UTC
  • mto: (2207.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2202.
  • Revision ID: shrewsbury.dave@gmail.com-20110223164925-s8wnolla2vwvlxiy
Changed slave services dedicated schema name from 'replication' to 'sys_replication' to avoid use of reserved word.

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
                              uint64_t trx_id,
131
131
                              uint32_t segment_id)
132
132
{
133
 
  string sql("SELECT `msg`, `commit_order` FROM `replication`.`queue`"
 
133
  string sql("SELECT `msg`, `commit_order` FROM `sys_replication`.`queue`"
134
134
             " WHERE `trx_id` = ");
135
135
  sql.append(boost::lexical_cast<string>(trx_id));
136
136
  sql.append(" AND `seg_id` = ", 16);
173
173
{
174
174
  Execute execute(*(_session.get()), true);
175
175
  
176
 
  string sql("SELECT `trx_id` FROM `replication`.`queue`"
 
176
  string sql("SELECT `trx_id` FROM `sys_replication`.`queue`"
177
177
             " WHERE `commit_order` IS NOT NULL ORDER BY `commit_order` ASC");
178
178
  
179
179
  /* ResultSet size must match column count */
315
315
 
316
316
  if (not status)
317
317
  {
318
 
    sql= "UPDATE `replication`.`applier_state` SET `status` = 'STOPPED'";
 
318
    sql= "UPDATE `sys_replication`.`applier_state` SET `status` = 'STOPPED'";
319
319
  }
320
320
  else
321
321
  {
322
 
    sql= "UPDATE `replication`.`applier_state` SET `status` = 'RUNNING'";
 
322
    sql= "UPDATE `sys_replication`.`applier_state` SET `status` = 'RUNNING'";
323
323
  }
324
324
  
325
325
  sql.append(", `error_msg` = '", 17);
351
351
bool QueueConsumer::executeSQLWithCommitId(vector<string> &sql,
352
352
                                           const string &commit_id)
353
353
{
354
 
  string tmp("UPDATE `replication`.`applier_state`"
 
354
  string tmp("UPDATE `sys_replication`.`applier_state`"
355
355
             " SET `last_applied_commit_id` = ");
356
356
  tmp.append(commit_id);
357
357
  sql.push_back(tmp);
362
362
 
363
363
bool QueueConsumer::deleteFromQueue(uint64_t trx_id)
364
364
{
365
 
  string sql("DELETE FROM `replication`.`queue` WHERE `trx_id` = ");
 
365
  string sql("DELETE FROM `sys_replication`.`queue` WHERE `trx_id` = ");
366
366
  sql.append(boost::lexical_cast<std::string>(trx_id));
367
367
 
368
368
  vector<string> sql_vect;