| 1 |
*** MDEV-5921: In parallel replication, an error is not correctly signalled to the next transaction *** |
| 2 |
include/master-slave.inc |
| 3 |
[connection master] |
| 4 |
connection server_2; |
| 5 |
include/stop_slave.inc |
| 6 |
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; |
| 7 |
SET GLOBAL slave_parallel_threads=10; |
| 8 |
CHANGE MASTER TO master_use_gtid=slave_pos; |
| 9 |
CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends"); |
| 10 |
include/start_slave.inc |
| 11 |
connection server_1; |
| 12 |
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; |
| 13 |
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; |
| 14 |
connection server_2; |
| 15 |
connection server_1; |
| 16 |
INSERT INTO t3 VALUES (110, 1); |
| 17 |
connection server_2; |
| 18 |
SELECT * FROM t3 WHERE a >= 110 ORDER BY a; |
| 19 |
a b |
| 20 |
110 1 |
| 21 |
SET sql_log_bin=0; |
| 22 |
INSERT INTO t3 VALUES (111, 666); |
| 23 |
SET sql_log_bin=1; |
| 24 |
connection server_1; |
| 25 |
connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,; |
| 26 |
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1'; |
| 27 |
INSERT INTO t3 VALUES (111, 2); |
| 28 |
connection server_1; |
| 29 |
SET debug_sync='now WAIT_FOR master_queued1'; |
| 30 |
connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,; |
| 31 |
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2'; |
| 32 |
INSERT INTO t3 VALUES (112, 3); |
| 33 |
connection server_1; |
| 34 |
SET debug_sync='now WAIT_FOR master_queued2'; |
| 35 |
SET debug_sync='now SIGNAL master_cont1'; |
| 36 |
connection con1; |
| 37 |
connection con2; |
| 38 |
SET debug_sync='RESET'; |
| 39 |
connection server_2; |
| 40 |
include/wait_for_slave_sql_error.inc [errno=1062] |
| 41 |
SELECT * FROM t3 WHERE a >= 110 ORDER BY a; |
| 42 |
a b |
| 43 |
110 1 |
| 44 |
111 666 |
| 45 |
SET sql_log_bin=0; |
| 46 |
DELETE FROM t3 WHERE a=111 AND b=666; |
| 47 |
SET sql_log_bin=1; |
| 48 |
START SLAVE SQL_THREAD; |
| 49 |
SELECT * FROM t3 WHERE a >= 110 ORDER BY a; |
| 50 |
a b |
| 51 |
110 1 |
| 52 |
111 2 |
| 53 |
112 3 |
| 54 |
connection server_2; |
| 55 |
include/stop_slave.inc |
| 56 |
SET GLOBAL slave_parallel_threads=@old_parallel_threads; |
| 57 |
include/start_slave.inc |
| 58 |
SET DEBUG_SYNC= 'RESET'; |
| 59 |
connection server_1; |
| 60 |
disconnect con1; |
| 61 |
disconnect con2; |
| 62 |
DROP TABLE t3; |
| 63 |
SET DEBUG_SYNC= 'RESET'; |
| 64 |
include/rpl_end.inc |