Debian Codegraph @

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

raw
1 ################################################################################
2 # Validates that a member that does have the group_replication_view_change_uuid
3 # global server option behaves like if the option value is AUTOMATIC.
4 #
5 # Test:
6 # 0. This test requires 2 members.
7 # 1. Bootstrap a group on server 1 faking that it is a
8 # server that does not have the option
9 # group_replication_view_change_uuid, thence it will not
10 # send it to group on join the handshake.
11 # 2. Try join a member with
12 # group_replication_view_change_uuid = UUID
13 # to the group, it shall fail.
14 # 3. Try join a member with
15 # GLOBAL.group_replication_view_change_uuid = AUTOMATIC
16 # to the group, it shall succeed.
17 # 4. Clean up.
18 #
19 ################################################################################
20 --source include/have_debug.inc
21 --source include/have_group_replication_plugin.inc
22 --let $rpl_skip_group_replication_start= 1
23 --source include/group_replication.inc
24
25
26 --echo
27 --echo ############################################################
28 --echo # 1. Bootstrap a group on server 1 faking that it is a
29 --echo # server that does not have the option
30 --echo # group_replication_view_change_uuid, thence it will not
31 --echo # send it to group on join the handshake.
32 --let $rpl_connection_name= server1
33 --source include/rpl_connection.inc
34 SET @@GLOBAL.DEBUG='+d,group_replication_skip_encode_view_change_uuid';
35 --source include/start_and_bootstrap_group_replication.inc
36
37
38 --echo
39 --echo ############################################################
40 --echo # 2. Try join a member with
41 --echo # group_replication_view_change_uuid = UUID
42 --echo # to the group, it shall fail.
43 --let $rpl_connection_name= server2
44 --source include/rpl_connection.inc
45
46 SET SESSION sql_log_bin = 0;
47 #call mtr.add_suppression("The member is configured with a default_table_encryption option value '1' different from the group '0'. The member will now exit the group.");
48 call mtr.add_suppression("The member is configured with a group_replication_view_change_uuid option value '.*' different from the group 'AUTOMATIC'. The member will now exit the group.");
49 SET SESSION sql_log_bin = 1;
50
51 --disable_query_log
52 --eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"
53 --enable_query_log
54
55 SET @group_replication_view_change_uuid_save= @@GLOBAL.group_replication_view_change_uuid;
56 SET @@GLOBAL.group_replication_view_change_uuid = 'c0dec0de-c0de-c0de-c0de-c0dec0dec0de';
57 --error ER_GROUP_REPLICATION_CONFIGURATION
58 START GROUP_REPLICATION;
59
60
61 --echo
62 --echo ############################################################
63 --echo # 3. Try join a member with
64 --echo # GLOBAL.group_replication_view_change_uuid = AUTOMATIC
65 --echo # to the group, it shall succeed.
66 SET @@GLOBAL.group_replication_view_change_uuid = AUTOMATIC;
67 --source include/start_group_replication.inc
68
69
70 --echo
71 --echo ############################################################
72 --echo # 4. Clean up.
73 --let $rpl_connection_name= server1
74 --source include/rpl_connection.inc
75 --source include/stop_group_replication.inc
76 SET @@GLOBAL.DEBUG='-d,group_replication_skip_encode_view_change_uuid';
77
78 --let $rpl_connection_name= server2
79 --source include/rpl_connection.inc
80 --source include/stop_group_replication.inc
81 SET @@GLOBAL.group_replication_view_change_uuid= @group_replication_view_change_uuid_save;
82
83 --source include/group_replication_end.inc