Debian Codegraph @

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

raw
1 include/group_replication.inc [rpl_server_count=3]
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
7 # 1. Create table for tests on a multi primary group
8 CREATE TABLE test.t1 (a INT PRIMARY KEY);
9 include/rpl_sync.inc
10 [connection server3]
11
12 # 2. Lock table on a server that will be a secondary and set its
13 # weight to be chosen as primary on single primary mode
14 [connection server2]
15 SET @@GLOBAL.group_replication_member_weight= 90;
16 LOCK TABLE t1 READ;
17
18 # 3. Insert a row on a group
19 [connection server1]
20 INSERT INTO t1 VALUES (1);
21
22 # 4. Invoke a change to single primary selecting server3 as new primary
23 SELECT group_replication_switch_to_single_primary_mode("MEMBER3_UUID");
24
25 # 5. Check that the other members are waiting to enable
26 # super_read_only and executing primary election
27 [connection server2]
28 include/assert.inc [The stage should be "Single-primary Switch: executing Primary election"]
29 include/assert.inc [The stage should be "stage/sql/Waiting for global read lock"]
30 [connection server_1]
31 include/assert.inc [The stage should be "Single-primary Switch: executing Primary election"]
32 include/assert.inc [The stage should be "Primary Election: waiting for members to enable super_read_only"]
33
34 # 6. Kill the primary selected when action was executed. Configure as
35 # single primary
36 [connection server3]
37 # Kill and restart:--group-replication-start-on-boot=0 --group-replication-group-name=GROUP_REPLICATION_GROUP_NAME --group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS --group_replication_single_primary_mode=TRUE --group_replication_enforce_update_everywhere_checks=FALSE --group_replication_communication_stack=GROUP_REPLICATION_COMMUNICATION_STACK
38 include/rpl_reconnect.inc
39
40 # 7. Wait group detect exit of server3
41 [connection server2]
42 include/rpl_gr_wait_for_number_of_members.inc
43
44 # 8. Unblock table on member that is blocked
45 UNLOCK TABLES;
46
47 # 9. Check that the action finishes
48 [connection server1]
49 group_replication_switch_to_single_primary_mode("MEMBER3_UUID")
50 Mode switched to single-primary with reported warnings: The appointed primary being elected exited the group. Check the group member list to see who is the primary.
51 Warnings:
52 Warning 3910 The appointed primary being elected exited the group. Check the group member list to see who is the primary. There were warnings detected also on other members, check their logs.
53
54 # 10. Confirm server2 is the new primary due its weight on member
55 # election
56 [connection server2]
57 include/gr_assert_primary_member.inc
58 [connection server1]
59 include/gr_assert_secondary_member.inc
60
61 # 11. Cleanup
62 [connection server3]
63 include/start_group_replication.inc
64 [connection server2]
65 SET @@GLOBAL.group_replication_member_weight= DEFAULT;
66 DROP TABLE t1;
67 include/group_replication_end.inc