Debian Codegraph @

mysql-test/suite/ndb_rpl/r/ndb_rpl_applier_conflict_role_var.result

raw
1 include/master-slave.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 master]
6 show global variables like 'ndb_applier_conflict_role';
7 Variable_name Value
8 ndb_applier_conflict_role NONE
9 Slave_SQL_Running = 'Yes'
10 stop slave sql_thread;
11 Warnings:
12 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
13 Slave_SQL_Running = 'No'
14 Show set-to-same state is ok
15 set global ndb_applier_conflict_role = NONE;
16 Now transition through all status, including set-to-self
17 set global ndb_applier_conflict_role = "PRIMARY";
18 show global variables like 'ndb_applier_conflict_role';
19 Variable_name Value
20 ndb_applier_conflict_role PRIMARY
21 set global ndb_applier_conflict_role = "PRIMARY";
22 set global ndb_applier_conflict_role = "SECONDARY";
23 show global variables like 'ndb_applier_conflict_role';
24 Variable_name Value
25 ndb_applier_conflict_role SECONDARY
26 set global ndb_applier_conflict_role = "SECONDARY";
27 set global ndb_applier_conflict_role = "NONE";
28 set global ndb_applier_conflict_role = "SECONDARY";
29 set global ndb_applier_conflict_role = "PRIMARY";
30 set global ndb_applier_conflict_role = "NONE";
31 set global ndb_applier_conflict_role = "PASS";
32 show global variables like 'ndb_applier_conflict_role';
33 Variable_name Value
34 ndb_applier_conflict_role PASS
35 set global ndb_applier_conflict_role = "PASS";
36 set global ndb_applier_conflict_role = "NONE";
37 Now test illegal transitions
38 set global ndb_applier_conflict_role = "PRIMARY";
39 set global ndb_applier_conflict_role = "PASS";
40 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from PRIMARY to PASS failed : Invalid role change.
41 show global variables like 'ndb_applier_conflict_role';
42 Variable_name Value
43 ndb_applier_conflict_role PRIMARY
44 set global ndb_applier_conflict_role = "SECONDARY";
45 set global ndb_applier_conflict_role = "PASS";
46 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from SECONDARY to PASS failed : Invalid role change.
47 show global variables like 'ndb_applier_conflict_role';
48 Variable_name Value
49 ndb_applier_conflict_role SECONDARY
50 set global ndb_applier_conflict_role = "NONE";
51 set global ndb_applier_conflict_role = "PASS";
52 set global ndb_applier_conflict_role = "PRIMARY";
53 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from PASS to PRIMARY failed : Invalid role change.
54 show global variables like 'ndb_applier_conflict_role';
55 Variable_name Value
56 ndb_applier_conflict_role PASS
57 set global ndb_applier_conflict_role = "SECONDARY";
58 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from PASS to SECONDARY failed : Invalid role change.
59 show global variables like 'ndb_applier_conflict_role';
60 Variable_name Value
61 ndb_applier_conflict_role PASS
62 set global ndb_applier_conflict_role = "NONE";
63 Now test transitions not possible due to
64 Slave SQL thread running
65 start slave sql_thread;
66 Warnings:
67 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
68 Slave_SQL_Running = 'Yes'
69 From NONE
70 set global ndb_applier_conflict_role = "NONE";
71 set global ndb_applier_conflict_role = "PRIMARY";
72 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from NONE to PRIMARY failed : Cannot change role while Replica SQL thread is running. Use STOP REPLICA first.
73 show global variables like 'ndb_applier_conflict_role';
74 Variable_name Value
75 ndb_applier_conflict_role NONE
76 set global ndb_applier_conflict_role = "SECONDARY";
77 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from NONE to SECONDARY failed : Cannot change role while Replica SQL thread is running. Use STOP REPLICA first.
78 show global variables like 'ndb_applier_conflict_role';
79 Variable_name Value
80 ndb_applier_conflict_role NONE
81 set global ndb_applier_conflict_role = "PASS";
82 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from NONE to PASS failed : Cannot change role while Replica SQL thread is running. Use STOP REPLICA first.
83 show global variables like 'ndb_applier_conflict_role';
84 Variable_name Value
85 ndb_applier_conflict_role NONE
86 stop slave sql_thread;
87 Warnings:
88 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
89 From PRIMARY
90 set global ndb_applier_conflict_role = "PRIMARY";
91 start slave sql_thread;
92 Warnings:
93 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
94 set global ndb_applier_conflict_role = "PRIMARY";
95 set global ndb_applier_conflict_role = "SECONDARY";
96 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from PRIMARY to SECONDARY failed : Cannot change role while Replica SQL thread is running. Use STOP REPLICA first.
97 show global variables like 'ndb_applier_conflict_role';
98 Variable_name Value
99 ndb_applier_conflict_role PRIMARY
100 set global ndb_applier_conflict_role = "NONE";
101 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from PRIMARY to NONE failed : Cannot change role while Replica SQL thread is running. Use STOP REPLICA first.
102 show global variables like 'ndb_applier_conflict_role';
103 Variable_name Value
104 ndb_applier_conflict_role PRIMARY
105 set global ndb_applier_conflict_role = "PASS";
106 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from PRIMARY to PASS failed : Invalid role change.
107 show global variables like 'ndb_applier_conflict_role';
108 Variable_name Value
109 ndb_applier_conflict_role PRIMARY
110 stop slave sql_thread;
111 Warnings:
112 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
113 From SECONDARY
114 set global ndb_applier_conflict_role = "SECONDARY";
115 start slave sql_thread;
116 Warnings:
117 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
118 set global ndb_applier_conflict_role = "SECONDARY";
119 set global ndb_applier_conflict_role = "PRIMARY";
120 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from SECONDARY to PRIMARY failed : Cannot change role while Replica SQL thread is running. Use STOP REPLICA first.
121 show global variables like 'ndb_applier_conflict_role';
122 Variable_name Value
123 ndb_applier_conflict_role SECONDARY
124 set global ndb_applier_conflict_role = "NONE";
125 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from SECONDARY to NONE failed : Cannot change role while Replica SQL thread is running. Use STOP REPLICA first.
126 show global variables like 'ndb_applier_conflict_role';
127 Variable_name Value
128 ndb_applier_conflict_role SECONDARY
129 set global ndb_applier_conflict_role = "PASS";
130 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from SECONDARY to PASS failed : Invalid role change.
131 show global variables like 'ndb_applier_conflict_role';
132 Variable_name Value
133 ndb_applier_conflict_role SECONDARY
134 stop slave sql_thread;
135 Warnings:
136 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
137 From PASS
138 set global ndb_applier_conflict_role = "NONE";
139 set global ndb_applier_conflict_role = "PASS";
140 start slave sql_thread;
141 Warnings:
142 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
143 set global ndb_applier_conflict_role = "PASS";
144 set global ndb_applier_conflict_role = "PRIMARY";
145 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from PASS to PRIMARY failed : Invalid role change.
146 show global variables like 'ndb_applier_conflict_role';
147 Variable_name Value
148 ndb_applier_conflict_role PASS
149 set global ndb_applier_conflict_role = "SECONDARY";
150 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from PASS to SECONDARY failed : Invalid role change.
151 show global variables like 'ndb_applier_conflict_role';
152 Variable_name Value
153 ndb_applier_conflict_role PASS
154 set global ndb_applier_conflict_role = "NONE";
155 ERROR HY000: Error when executing command SET GLOBAL ndb_applier_conflict_role: Role change from PASS to NONE failed : Cannot change role while Replica SQL thread is running. Use STOP REPLICA first.
156 show global variables like 'ndb_applier_conflict_role';
157 Variable_name Value
158 ndb_applier_conflict_role PASS
159 stop slave sql_thread;
160 Warnings:
161 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
162 set global ndb_applier_conflict_role = "NONE";
163 Test some aliases for role names
164 set global ndb_applier_conflict_role = PR;
165 show global variables like 'ndb_applier_conflict_role';
166 Variable_name Value
167 ndb_applier_conflict_role PRIMARY
168 set global ndb_applier_conflict_role = S;
169 show global variables like 'ndb_applier_conflict_role';
170 Variable_name Value
171 ndb_applier_conflict_role SECONDARY
172 set global ndb_applier_conflict_role = N;
173 show global variables like 'ndb_applier_conflict_role';
174 Variable_name Value
175 ndb_applier_conflict_role NONE
176 set global ndb_applier_conflict_role = PA;
177 show global variables like 'ndb_applier_conflict_role';
178 Variable_name Value
179 ndb_applier_conflict_role PASS
180 set global ndb_applier_conflict_role = 0;
181 show global variables like 'ndb_applier_conflict_role';
182 Variable_name Value
183 ndb_applier_conflict_role NONE
184 set global ndb_applier_conflict_role = 2;
185 show global variables like 'ndb_applier_conflict_role';
186 Variable_name Value
187 ndb_applier_conflict_role PRIMARY
188 set global ndb_applier_conflict_role = 1;
189 show global variables like 'ndb_applier_conflict_role';
190 Variable_name Value
191 ndb_applier_conflict_role SECONDARY
192 set global ndb_applier_conflict_role = 0;
193 show global variables like 'ndb_applier_conflict_role';
194 Variable_name Value
195 ndb_applier_conflict_role NONE
196 set global ndb_applier_conflict_role = 3;
197 show global variables like 'ndb_applier_conflict_role';
198 Variable_name Value
199 ndb_applier_conflict_role PASS
200 set global ndb_applier_conflict_role = NON;
201 start slave sql_thread;
202 Warnings:
203 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
204 include/rpl_end.inc
205
206 # Reboot server setting with both ndb_slave_conflict_role & ndb_applier_conflict_role variable.
207 call mtr.add_suppression("mysqld startup An incident event has been written to the binary log which will stop the replicas");
208 # restart:--ndb_slave_conflict_role=PRIMARY --ndb_applier_conflict_role=SECONDARY
209 include/assert_grep.inc [Deprecation warning is logged during startup.]
210
211 # when new and deprecated variables are set, only new value should be considered
212 show global variables like 'ndb_applier_conflict_role';
213 Variable_name Value
214 ndb_applier_conflict_role SECONDARY
215 show global variables like 'ndb_slave_conflict_role';
216 Variable_name Value
217 ndb_slave_conflict_role SECONDARY
218
219 # updating one variables should also update the other variable
220 set global ndb_slave_conflict_role = "PRIMARY";
221 Warnings:
222 Warning 1287 'ndb_slave_conflict_role' is deprecated and will be removed in a future release. Please use ndb_applier_conflict_role instead
223 show global variables like 'ndb_applier_conflict_role';
224 Variable_name Value
225 ndb_applier_conflict_role PRIMARY
226 show global variables like 'ndb_slave_conflict_role';
227 Variable_name Value
228 ndb_slave_conflict_role PRIMARY
229 set global ndb_applier_conflict_role = "NONE";
230 show global variables like 'ndb_applier_conflict_role';
231 Variable_name Value
232 ndb_applier_conflict_role NONE
233 show global variables like 'ndb_slave_conflict_role';
234 Variable_name Value
235 ndb_slave_conflict_role NONE