Debian Codegraph @

mysql-test/suite/galera/t/MDEV-28053.test

raw
1 #
2 # MDEV-28053 - Sysbench data load crashes Galera secondary node in
3 # async master slave setup
4 #
5 # Setup: node 3 is a regular MariaDB server, nodes 1 and 2 are members
6 # of a Galera cluster. Node 2 connects to node 3 through async replication.
7 #
8 # Test uses multiple parallel async applier threads (see MDEV-28053.cnf)
9 #
10
11 --source include/have_innodb.inc
12 --source include/galera_cluster.inc
13
14 --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
15
16 --connection node_3
17 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
18
19 #
20 # Execute a few INSERTs, to simulate sysbench data load phase
21 #
22 --let $counter=100
23 --disable_query_log
24 while ($counter) {
25 --connection node_3
26 INSERT INTO t1 VALUES();
27 --dec $counter
28 }
29 --enable_query_log
30 --let gtid = `SELECT @@last_gtid`
31
32 #
33 # Start async replication on node 2.
34 # If bug is present, expect a crash when applying
35 # events concurrently.
36 #
37 --connection node_2
38 --disable_query_log
39 --disable_result_log
40 --eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0, MASTER_PORT=$NODE_MYPORT_3;
41 START SLAVE;
42
43 --eval SELECT MASTER_GTID_WAIT('$gtid', 600)
44 --enable_result_log
45 --enable_query_log
46
47 #
48 # Cleanup
49 #
50 --connection node_3
51 DROP TABLE t1;
52
53 --connection node_2
54 --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
55 --source include/wait_condition.inc
56
57 --connection node_2
58 STOP SLAVE;
59 RESET SLAVE ALL;
60
61 --connection node_3
62 RESET MASTER;