Commit 6041d9c8 authored by Luis Soares's avatar Luis Soares

Fix for BUG#11868903 (BUG#59717)

      
There is a race between two threads: user thread and the dump
thread. The former sets a debug instruction that makes the latter wait
before processing an Xid event. There can be cases that the dump
thread has not yet processed the previous Xid event, causing it to
wait one Xid event too soon, thus causing sync_slave_with_master never
to resume.
      
We fix this by moving the instructions that set the debug variable
after calling sync_slave_with_master.
parent 9320dca9
......@@ -146,6 +146,7 @@ DROP TABLE t1, t2;
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1, 1);
[connection master]
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
[connection slave]
include/restart_slave.inc
......
......@@ -76,11 +76,13 @@ CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1, 1);
sync_slave_with_master;
--source include/rpl_connection_master.inc
let $debug_save= `SELECT @@GLOBAL.debug`;
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
sync_slave_with_master;
--source include/rpl_connection_slave.inc
source include/restart_slave_sql.inc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment