Debian Codegraph @

mysql-test/suite/group_replication/r/gr_cross_version_mode_switches.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. Bootstrap M1.
8 # Start GR on M2 with higher weight and patch version.
9
10 [connection server1]
11 SET SESSION sql_log_bin=0;
12 call mtr.add_suppression("Error while executing a group configuration operation: Error processing configuration start message: The appointed primary member has a version that is greater than the one of some of the members in the group.");
13 SET SESSION sql_log_bin=1;
14 include/start_and_bootstrap_group_replication.inc
15 [connection server2]
16 SET @member_weight2_save= @@GLOBAL.group_replication_member_weight;
17 SET GLOBAL group_replication_member_weight= 90;
18 SET @debug2_save= @@GLOBAL.DEBUG;
19 SET @@GLOBAL.DEBUG= 'd,group_replication_compatibility_higher_patch_version';
20 SET SESSION sql_log_bin=0;
21 call mtr.add_suppression("Member version is read compatible with the group.");
22 call mtr.add_suppression("Error while executing a group configuration operation: Error processing configuration start message: The appointed primary member has a version that is greater than the one of some of the members in the group.");
23 call mtr.add_suppression("The function 'group_replication_switch_to_single_primary_mode' failed. Error processing configuration start message: The appointed primary member has a version that is greater than the one of some of the members in the group.");
24 SET SESSION sql_log_bin=1;
25 include/start_group_replication.inc
26
27 # 2. Set M2 as primary, it fails due to higher patch version.
28
29 SELECT group_replication_switch_to_single_primary_mode("MEMBER_UUID");;
30 ERROR HY000: The function 'group_replication_switch_to_single_primary_mode' failed. Error processing configuration start message: The appointed primary member has a version that is greater than the one of some of the members in the group.
31 include/gr_assert_mpm_consistency.inc
32
33 # 3. Switch to single-primary mode.
34 # M1 becomes primary due to lower version rule.
35
36 SELECT group_replication_switch_to_single_primary_mode();
37 group_replication_switch_to_single_primary_mode()
38 Mode switched to single-primary successfully.
39 include/gr_assert_spm_consistency.inc
40
41 # 4. Switch to multi-primary mode and start GR on M3.
42
43 SELECT group_replication_switch_to_multi_primary_mode();
44 group_replication_switch_to_multi_primary_mode()
45 Mode switched to multi-primary successfully.
46 [connection server3]
47 SET @member_weight3_save= @@GLOBAL.group_replication_member_weight;
48 SET SESSION sql_log_bin=0;
49 call mtr.add_suppression("The function 'group_replication_set_as_primary' failed. Error processing configuration start message: The appointed primary member has a version that is greater than the one of some of the members in the group.");
50 SET SESSION sql_log_bin=1;
51 include/start_group_replication.inc
52 include/gr_assert_mpm_consistency.inc
53
54 # 5. Switch to single primary mode holding elections.
55 # M2 is not considered due to higher patch version,
56 # even though it has higher member weight.
57 # M1 and M3 has same version and weight,
58 # lower server_uuid become primary.
59 # Assert configurations are correct.
60
61 SELECT group_replication_switch_to_single_primary_mode();
62 group_replication_switch_to_single_primary_mode()
63 Mode switched to single-primary successfully.
64 include/gr_assert_spm_consistency.inc
65
66 # 6. Change primary, UDF fails if new primary has higher version.
67 # Assert configurations are not changed.
68
69 SELECT group_replication_set_as_primary("MEMBER_UUID");;
70 ERROR HY000: The function 'group_replication_set_as_primary' failed. Error processing configuration start message: The appointed primary member has a version that is greater than the one of some of the members in the group.
71 include/gr_assert_spm_consistency.inc
72
73 # 7. Switch to multi-primary mode.
74 # Assert configurations are correct.
75
76 SELECT group_replication_switch_to_multi_primary_mode();
77 group_replication_switch_to_multi_primary_mode()
78 Mode switched to multi-primary successfully.
79 include/gr_assert_mpm_consistency.inc
80
81 # 8. Change primary to M3.
82 # Assert configurations are correct.
83
84 SELECT group_replication_switch_to_single_primary_mode("MEMBER_UUID");;
85 group_replication_switch_to_single_primary_mode("MEMBER_UUID")
86 Mode switched to single-primary successfully.
87 include/gr_assert_spm_consistency.inc
88
89 # 9. Change primary, UDF succedds if new primary has lowest version.
90 # Assert configurations are correct.
91
92 SELECT group_replication_set_as_primary("MEMBER_UUID");;
93 group_replication_set_as_primary("MEMBER_UUID")
94 Primary server switched to: MEMBER_UUID
95 include/gr_assert_spm_consistency.inc
96
97 # 10. Make M3 weight higher and switch to SPM mode. M3 becomes primary.
98 # Member weight is considered among lowest equal versions.
99 # Assert configurations are correct.
100
101 SELECT group_replication_switch_to_multi_primary_mode();
102 group_replication_switch_to_multi_primary_mode()
103 Mode switched to multi-primary successfully.
104 [connection server3]
105 SET GLOBAL group_replication_member_weight= 60;
106 SELECT group_replication_switch_to_single_primary_mode();
107 group_replication_switch_to_single_primary_mode()
108 Mode switched to single-primary successfully.
109 include/gr_assert_spm_consistency.inc
110
111 # 11. Cleanup.
112
113 SET @@GLOBAL.group_replication_member_weight = @member_weight3_save;
114 [connection server2]
115 SELECT group_replication_switch_to_multi_primary_mode();
116 group_replication_switch_to_multi_primary_mode()
117 Mode switched to multi-primary successfully.
118 include/stop_group_replication.inc
119 SET @@GLOBAL.group_replication_member_weight = @member_weight2_save;
120 SET @@GLOBAL.DEBUG= @debug2_save;
121 include/start_group_replication.inc
122 include/group_replication_end.inc