You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Start a connection that will block the replicated transaction halfway.
58
59
--connection con_temp1
59
60
BEGIN;
60
61
INSERT INTO t2 VALUES (21);
61
62
62
63
--connection server_2
63
-
START SLAVE;
64
+
65
+
#
66
+
# Parallel replication will complete any in-progress event group at STOP SLAVE,
67
+
# but only if the event group is already queued up for the worker thread. If
68
+
# the SQL driver thread is delayed in queueing up events, the parallel worker
69
+
# thread can abort the event group, leaving the non-transactional update to the
70
+
# MyISAM table that cannot be rolled back (MDEV-7432). If this happens the test
71
+
# would fail with duplicate key error after slave restart.
72
+
#
73
+
# To avoid this, we here wait for the IO thread to read all master events, and
74
+
# for the SQL driver thread to queue all the events for workers. This wait
75
+
# should be removed if/when MDEV-7432 is fixed.
76
+
#
77
+
START SLAVE IO_THREAD;
78
+
--let $slave_param= Read_Master_Log_Pos
79
+
--let $slave_param_value= $master_pos
80
+
--source include/wait_for_slave_param.inc
81
+
START SLAVE SQL_THREAD;
82
+
--let $wait_condition= SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State LIKE '%Slave has read all relay log; waiting for more updates%'
83
+
--source include/wait_condition.inc
84
+
64
85
# Wait for the MyISAM change to be visible, after which replication will wait
65
86
# for con_temp1 to roll back.
66
87
--let $wait_condition= SELECT COUNT(*) = 1 FROM t1 WHERE a=20
0 commit comments