Debian Codegraph @

mysql-test/suite/group_replication/t/gr_view_change_event_wait_break.test

raw
1 ################################################################################
2 # This test verifies that the user can break the loop that tries to assure the
3 # view id order with a stop group replication command.
4 #
5 # To test this, the following steps are taken:
6 # 0) The test requires two servers: M1 and M2.
7 # 1) With both the members ONLINE. Create a table t1 on M1. Block the execution
8 # of remote transactions by locking table t1 on M1.
9 # 2) Execute a transaction and stop group replication on M2.
10 # 3) Stop group replication and unlock table t1 from parallel session on M1.
11 # 5) Verify that M1 stopped.
12 # 6) Clean up.
13 ################################################################################
14
15 --source include/big_test.inc
16 --source include/have_group_replication_plugin.inc
17 --source include/group_replication.inc
18
19 --echo #
20 --echo # Setup a 2 member group and create a table
21 --echo #
22
23 --let $rpl_connection_name= server1
24 --source include/rpl_connection.inc
25
26 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
27
28 --source include/rpl_sync.inc
29
30 --echo
31 --echo # Lock writes on table t1
32 --echo
33
34 --let $rpl_connection_name= server1
35 --source include/rpl_connection.inc
36
37 LOCK TABLE t1 WRITE;
38
39 --echo #
40 --echo # On server2 execute a transaction and stop group replication.
41 --echo #
42
43 --let $rpl_connection_name= server2
44 --source include/rpl_connection.inc
45
46 INSERT INTO t1 VALUES (1);
47
48 --source include/stop_group_replication.inc
49
50 --echo #
51 --echo # Stop group replication and check it stops after the unlock
52 --echo #
53
54 #use this connection to send the query as debug includes can use the default ones
55 --let $rpl_connection_name= server_1_1
56 --source include/rpl_connection.inc
57
58 --send STOP GROUP_REPLICATION
59
60 --let $rpl_connection_name= server1
61 --source include/rpl_connection.inc
62
63 UNLOCK TABLES;
64
65 --let $rpl_connection_name= server_1_1
66 --source include/rpl_connection.inc
67
68 --reap
69
70 --let $group_replication_member_state= OFFLINE
71 --source include/gr_wait_for_member_state.inc
72
73 --echo #
74 --echo # Clean
75 --echo #
76
77 --let $rpl_connection_name= server2
78 --source include/rpl_connection.inc
79 --source include/start_and_bootstrap_group_replication.inc
80
81 DROP TABLE t1;
82
83 --let $rpl_connection_name= server1
84 --source include/rpl_connection.inc
85
86 --source include/start_group_replication.inc
87
88 --source include/group_replication_end.inc