56
56
SET GLOBAL debug= '$debug_save';
60
source include/master-slave-end.inc;
57
source include/restart_slave_sql.inc;
59
--source include/rpl_connection_master.inc
63
--echo # Bug#58546 test rpl_packet timeout failure sporadically on PB
64
--echo # ----------------------------------------------------------------------
65
--echo # STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
66
--echo # possible that IO thread stopped after replicating part of a transaction
67
--echo # which SQL thread was executing. SQL thread would be hung if the
68
--echo # transaction could not be rolled back safely.
69
--echo # It caused some sporadic failures on PB2.
71
--echo # This test verifies that when 'STOP SLAVE' is issued by a user, IO
72
--echo # thread will continue to fetch the rest events of the transaction which
73
--echo # is being executed by SQL thread and is not able to be rolled back safely.
75
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
76
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
77
INSERT INTO t1 VALUES(1, 1);
79
sync_slave_with_master;
81
--source include/rpl_connection_master.inc
83
let $debug_save= `SELECT @@GLOBAL.debug`;
84
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
86
--source include/rpl_connection_slave.inc
87
source include/restart_slave_sql.inc;
90
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
92
--source include/rpl_connection_master.inc
94
INSERT INTO t1 VALUES(2, 2);
95
INSERT INTO t2 VALUES(1);
96
UPDATE t1 SET c2 = 3 WHERE c1 = 1;
99
--source include/rpl_connection_slave1.inc
100
let $show_statement= SHOW PROCESSLIST;
102
let $condition= = 'UPDATE t1 SET c2 = 3 WHERE c1 = 1';
103
source include/wait_show_condition.inc;
107
--source include/rpl_connection_slave.inc
110
--source include/rpl_connection_master.inc
111
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
112
SET DEBUG_SYNC= 'RESET';
114
--source include/rpl_connection_slave.inc
115
source include/wait_for_slave_to_stop.inc;
117
--source include/rpl_connection_slave1.inc
119
source include/start_slave.inc;
121
--source include/rpl_connection_master.inc
123
SET GLOBAL debug= $debug_save;
124
--source include/rpl_end.inc