~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/slave/queue_producer.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:
189
189
   * the queue.
190
190
   */
191
191
  string sql("SELECT MAX(x.cid) FROM"
192
 
             " (SELECT MAX(`commit_order`) AS cid FROM `replication`.`queue`"
 
192
             " (SELECT MAX(`commit_order`) AS cid FROM `sys_replication`.`queue`"
193
193
             "  UNION ALL SELECT `last_applied_commit_id` AS cid"
194
 
             "  FROM `replication`.`applier_state`) AS x");
 
194
             "  FROM `sys_replication`.`applier_state`) AS x");
195
195
 
196
196
  sql::ResultSet result_set(1);
197
197
  Execute execute(*(_session.get()), true);
292
292
  /*
293
293
   * The SQL to insert our results into the local queue.
294
294
   */
295
 
  string sql= "INSERT INTO `replication`.`queue`"
 
295
  string sql= "INSERT INTO `sys_replication`.`queue`"
296
296
              " (`trx_id`, `seg_id`, `commit_order`, `msg`) VALUES (";
297
297
  sql.append(trx_id);
298
298
  sql.append(", ", 2);
440
440
 
441
441
  if (not status)
442
442
  {
443
 
    sql= "UPDATE `replication`.`io_state` SET `status` = 'STOPPED'";
 
443
    sql= "UPDATE `sys_replication`.`io_state` SET `status` = 'STOPPED'";
444
444
  }
445
445
  else
446
446
  {
447
 
    sql= "UPDATE `replication`.`io_state` SET `status` = 'RUNNING'";
 
447
    sql= "UPDATE `sys_replication`.`io_state` SET `status` = 'RUNNING'";
448
448
  }
449
449
  
450
450
  sql.append(", `error_msg` = '", 17);