Debian Codegraph @

mysql-test/suite/rpl/t/rpl_parallel_rollback_assert.test

raw
1 --echo *** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
2 --source include/have_innodb.inc
3 --source include/master-slave.inc
4
5 --connection server_2
6 SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
7 --source include/stop_slave.inc
8 SET GLOBAL slave_parallel_threads=10;
9 CHANGE MASTER TO master_use_gtid=slave_pos;
10 --source include/start_slave.inc
11
12 --connection server_1
13 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
14 CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
15 CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
16 --save_master_pos
17
18 --connection server_2
19 --sync_with_master
20
21 --connection server_1
22 # Inject an event group terminated by ROLLBACK, by mixing MyISAM and InnoDB
23 # in a transaction. The bug was an assertion on the ROLLBACK due to
24 # mark_start_commit() being already called.
25 --disable_warnings
26 BEGIN;
27 INSERT INTO t2 VALUES (2000);
28 INSERT INTO t1 VALUES (2000);
29 INSERT INTO t2 VALUES (2001);
30 ROLLBACK;
31 --enable_warnings
32 SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
33 SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
34 --source include/save_master_gtid.inc
35
36 --connection server_2
37 --source include/sync_with_master_gtid.inc
38
39 --connection server_1
40 INSERT INTO t2 VALUES (2020);
41 --source include/save_master_gtid.inc
42
43 --connection server_2
44 --source include/sync_with_master_gtid.inc
45 SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
46 let $rows_in_t1= `SELECT COUNT(*) FROM t1 WHERE a>=2000 ORDER BY a`;
47 if ($rows_in_t1 == 0)
48 {
49 --query_vertical SHOW SLAVE STATUS
50 }
51 SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
52
53 # Clean up.
54 --source include/stop_slave.inc
55 SET GLOBAL slave_parallel_threads=@old_parallel_threads;
56 --source include/start_slave.inc
57
58 --connection server_1
59 DROP TABLE t1,t2;
60
61 --source include/rpl_end.inc
62