Debian Codegraph @

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

raw
1 ################################################################################
2 # This test checks that executing a SET GLOBAL.GTID_MODE when GROUP_REPLICATION
3 # is starting it don't block the server.
4 #
5 # Test:
6 # 0. The test requires one server
7 # 1. Enable debug point to block server on start
8 # 2. Configure server and START Group Replication
9 # 3. SET @@GLOBAL.GTID_MODE will fail due Group Replication hold lock on
10 # gtid_set_mode
11 # 4. Send signal to server to unlock start
12 # 5. Cleanup
13 #
14 ################################################################################
15
16 --source include/have_debug_sync.inc
17 --source include/have_group_replication_plugin.inc
18 --let $rpl_skip_group_replication_start= 1
19 --source include/group_replication.inc
20
21 --echo
22 --echo # 1. Enable debug point to block server on start
23
24 SET @debug_save= @@GLOBAL.DEBUG;
25 SET @@GLOBAL.DEBUG= 'd,group_replication_wait_on_start';
26
27 --echo
28 --echo # 2. Configure server and START Group Replication
29
30 --replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME
31 --eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"
32 SET GLOBAL GROUP_REPLICATION_BOOTSTRAP_GROUP=1;
33 --send START GROUP_REPLICATION;
34
35 --echo
36 --echo # 3. SET @@GLOBAL.GTID_MODE will fail due Group Replication hold lock on
37 --echo # gtid_set_mode
38
39 --let $rpl_connection_name= server_1
40 --source include/rpl_connection.inc
41
42 SET DEBUG_SYNC= "now WAIT_FOR signal.start_waiting";
43
44 --error ER_CANT_SET_GTID_MODE
45 SET GLOBAL GTID_MODE=ON;
46
47 --echo
48 --echo # 4. Send signal to server to unlock start
49
50 SET DEBUG_SYNC= 'now SIGNAL signal.start_continue';
51
52 --let $rpl_connection_name= server1
53 --source include/rpl_connection.inc
54
55 --reap
56
57 --let $group_replication_member_state= ONLINE
58 --source include/gr_wait_for_member_state.inc
59
60 --echo
61 --echo # 5. Cleanup
62
63 SET @@GLOBAL.DEBUG= @debug_save;
64 --source include/group_replication_end.inc