slave plugin queryForReplicationEvents() query needs to be ordered

Bug #755201 reported by Joe Daly
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Joe Daly
Fix Released
Joe Daly

Bug Description

I believe the following query in the slave plugin should be ordered by commit_id the query below will be ordered by id, and this order will be used as the order that events are inserted into the queue. The id matches with trx_id which is not always ordered.

This could result in events that are read in the incorrect order by the consumer, if the timing is just right. I suspect this to be the problem with the multi-master test failures, as when I add the order clause the failures go away, but the errors don't show up outside the multi-master code so that is a little puzzling.

   * The SQL to pull everything we need from the master.
  string sql= "SELECT `id`, `segid`, `commit_id`, `message`, `message_len` "
              " FROM `data_dictionary`.`sys_replication_log` WHERE `id` IN (";

  for (size_t x= 0; x < trx_id_list.size(); x++)
    if (x > 0)
      sql.append(", ", 2);

  sql.append(")", 1);

Related branches

Joe Daly (skinny.moey)
Changed in drizzle:
status: New → In Progress
assignee: nobody → Joe Daly (skinny.moey)
importance: Undecided → Medium
Joe Daly (skinny.moey)
Changed in drizzle:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.