Debian Codegraph @

mysql-test/suite/group_replication/r/gr_primary_mode_group_operations_09.result

raw
1 include/group_replication.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection server1]
6 include/start_and_bootstrap_group_replication.inc
7
8 # 1. Activate debug point that will block the group action when changing
9 # to single primary mode
10 SET @@GLOBAL.DEBUG= '+d,group_replication_block_group_action_stop';
11
12 # 2. Execute action to change group to single primary mode
13 SELECT group_replication_switch_to_single_primary_mode("MEMBER1_UUID");
14 [connection server_1]
15
16 # 3. A new member can't start GR while an action is being executed.
17 # We also block the member from leaving after the error
18 # Wait for the member to be visible on server 1
19 [connection server2]
20 SET GLOBAL group_replication_group_name= 'GROUP_NAME';
21 SET @@GLOBAL.DEBUG= '+d,group_replication_wait_before_leave_on_error';
22 SET GLOBAL group_replication_enforce_update_everywhere_checks= FALSE;
23 SET GLOBAL group_replication_single_primary_mode= TRUE;
24 START GROUP_REPLICATION;
25 [connection server_1]
26 include/rpl_gr_wait_for_number_of_members.inc
27
28 # 4. Unlock the action on server 1
29 [connection server_1]
30 SET DEBUG_SYNC= "now SIGNAL signal.action_stop_continue";
31 [connection server1]
32 group_replication_switch_to_single_primary_mode("MEMBER1_UUID")
33 Mode switched to single-primary successfully.
34 include/rpl_gr_wait_for_number_of_members.inc
35
36 # 5. Allow server 2 to leave
37 # Check an error was returned by the start process
38 [connection server_2]
39 SET DEBUG_SYNC= "now SIGNAL signal.continue_leave_process";
40 [connection server2]
41 ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log.
42 [connection server_1]
43 include/rpl_gr_wait_for_number_of_members.inc
44
45 # 6. After action is executed we can add another member
46 [connection server2]
47 set session sql_log_bin=0;
48 call mtr.add_suppression("A member cannot join the group while a group configuration operation 'Change to single primary mode' is running initiated by *");
49 set session sql_log_bin=1;
50 include/start_group_replication.inc
51
52 # 7. Cleanup
53 [connection server1]
54 SET @@GLOBAL.DEBUG= '-d,group_replication_block_group_action_stop';
55 set session sql_log_bin=0;
56 call mtr.add_suppression("A member is joining the group while a group configuration operation 'Change to single primary mode' is running*");
57 set session sql_log_bin=1;
58 [connection server2]
59 SET @@GLOBAL.DEBUG= '-d,group_replication_wait_before_leave_on_error';
60 include/group_replication_end.inc