@@ -115,6 +115,7 @@ SET GLOBAL slave_parallel_threads=10;
...
@@ -115,6 +115,7 @@ SET GLOBAL slave_parallel_threads=10;
SET debug_sync='RESET';
SET debug_sync='RESET';
include/start_slave.inc
include/start_slave.inc
*** Test that group-committed transactions on the master can replicate in parallel on the slave. ***
*** Test that group-committed transactions on the master can replicate in parallel on the slave. ***
SET debug_sync='RESET';
FLUSH LOGS;
FLUSH LOGS;
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7);
INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7);
...
@@ -141,6 +142,7 @@ INSERT INTO t3 VALUES (6, foo(16,
...
@@ -141,6 +142,7 @@ INSERT INTO t3 VALUES (6, foo(16,
''));
''));
SET debug_sync='now WAIT_FOR master_queued3';
SET debug_sync='now WAIT_FOR master_queued3';
SET debug_sync='now SIGNAL master_cont1';
SET debug_sync='now SIGNAL master_cont1';
SET debug_sync='RESET';
SELECT * FROM t3 ORDER BY a;
SELECT * FROM t3 ORDER BY a;
a b
a b
1 1
1 1
...
@@ -213,6 +215,9 @@ slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
...
@@ -213,6 +215,9 @@ slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
slave-bin.000003 # Xid # # COMMIT /* XID */
slave-bin.000003 # Xid # # COMMIT /* XID */
*** Test STOP SLAVE in parallel mode ***
*** Test STOP SLAVE in parallel mode ***
include/stop_slave.inc
include/stop_slave.inc
SET debug_sync='RESET';
SET GLOBAL slave_parallel_threads=0;
SET GLOBAL slave_parallel_threads=10;
SET binlog_direct_non_transactional_updates=0;
SET binlog_direct_non_transactional_updates=0;
SET sql_log_bin=0;
SET sql_log_bin=0;
CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction");
CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction");
...
@@ -227,10 +232,15 @@ INSERT INTO t3 VALUES(21, 21);
...
@@ -227,10 +232,15 @@ INSERT INTO t3 VALUES(21, 21);
INSERT INTO t3 VALUES(22, 22);
INSERT INTO t3 VALUES(22, 22);
SET binlog_format=@old_format;
SET binlog_format=@old_format;
BEGIN;
BEGIN;
INSERT INTO t2 VALUES (21);
INSERT INTO t2 VALUES (21);
START SLAVE;
START SLAVE;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
STOP SLAVE;
STOP SLAVE;
SET debug_sync='now WAIT_FOR wait_for_done_waiting';
ROLLBACK;
ROLLBACK;
SET GLOBAL debug_dbug=@old_dbug;
SET debug_sync='RESET';
include/wait_for_slave_to_stop.inc
include/wait_for_slave_to_stop.inc
SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
a
a
...
@@ -292,6 +302,7 @@ a b
...
@@ -292,6 +302,7 @@ a b
32 32
32 32
33 33
33 33
34 34
34 34
SET debug_sync='RESET';
SET sql_log_bin=0;
SET sql_log_bin=0;
CALL mtr.add_suppression("Query execution was interrupted");
CALL mtr.add_suppression("Query execution was interrupted");
CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");