Debian Codegraph @

mysql-test/suite/binlog_nogtid/r/binlog_anonymous_ownership.result

raw
1 include/rpl_init.inc [topology=none]
2 ==== Initialize ====
3 SET GLOBAL ENFORCE_GTID_CONSISTENCY = ON;
4 CREATE TABLE statements (
5 id INT PRIMARY KEY AUTO_INCREMENT,
6 comment VARCHAR(100) NOT NULL,
7 connection INT,
8 statement VARCHAR(1000),
9 gtid_next VARCHAR(100) NOT NULL,
10 gtid_owned VARCHAR(100) NOT NULL,
11 anonymous_count INT NOT NULL,
12 sync_point VARCHAR(100) NOT NULL,
13 error VARCHAR(100) NOT NULL
14 ) ENGINE = InnoDB;
15 INSERT INTO statements
16 (comment, connection, statement, gtid_next, gtid_owned, anonymous_count,
17 sync_point, error)
18 VALUES
19 #comment
20 #con statement gtid_next gtid_owned count sync error
21 ('Nothing should be owned by default.',
22 1, '', 'AUTOMATIC', '', 0, '', ''),
23 ('Set gtid_next (automatic->anonymous) acquires ownership.',
24 1, 'SET GTID_NEXT="ANONYMOUS"', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
25 ('Implicit commit releases ownership.',
26 1, 'CREATE TABLE t1 (a INT)', 'ANONYMOUS', '', 0, '', ''),
27 ('Implicitly committing statement re-acquires ownership.',
28 1, 'CREATE TABLE t2 (a INT)', '', '', 1, '->before_execute_sql_command', ''),
29 ('Implicitly committing statement releases ownership at the end.',
30 1, '#CREATE TABLE t2 (a INT)', 'ANONYMOUS', '', 0, 'before_execute_sql_command->', ''),
31 ('Set gtid_next (anonymous->anonymous) acquires ownership.',
32 1, 'SET GTID_NEXT="ANONYMOUS"', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
33 ('Nothing special happens with ownership while inside a transaction.',
34 1, 'BEGIN', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
35 ('',
36 1, 'INSERT INTO t1 VALUES (1)', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
37 ('Commit releases ownership.',
38 1, 'COMMIT', 'ANONYMOUS', '', 0, '', ''),
39 ('Begin acquires ownership.',
40 1, 'BEGIN', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
41 ('Commit releases ownership even if nothing executed.',
42 1, 'COMMIT', 'ANONYMOUS', '', 0, '', ''),
43 ('Rollback releases ownership.',
44 1, 'BEGIN', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
45 ('',
46 1, 'ROLLBACK', 'ANONYMOUS', '', 0, '', ''),
47 ('Implicit commit in transaction releases ownership.',
48 1, 'BEGIN', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
49 ('',
50 1, 'INSERT INTO t1 VALUES (1)', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
51 ('',
52 1, 'DROP TABLE t2', 'ANONYMOUS', '', 0, '->after_implicit_pre_commit', ''),
53 ('',
54 1, '#DROP TABLE t2', 'ANONYMOUS', '', 0, 'after_implicit_pre_commit->', ''),
55 ('Autocommit transaction acquires ownership.',
56 1, 'INSERT INTO t1 VALUES (1)', '', '', 1, '->before_execute_sql_command', ''),
57 ('Autocommit transaction releases ownership at end.',
58 1, '#INSERT INTO t1 VALUES (1)', 'ANONYMOUS', '', 0, 'before_execute_sql_command->', ''),
59 ('SET does not acquire ownership.',
60 1, 'SET AUTOCOMMIT = 0', 'ANONYMOUS', '', 0, '', ''),
61 ('Non-autocommitted DML acquires ownership.',
62 1, 'INSERT INTO t1 VALUES (1)', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
63 ('',
64 1, 'INSERT INTO t1 VALUES (1)', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
65 ('',
66 1, 'ROLLBACK', 'ANONYMOUS', '', 0, '', ''),
67 ('Client disconnect releases ownership.',
68 1, 'BEGIN', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
69 ('',
70 1, 'reconnect', 'AUTOMATIC', '', 0, '', ''),
71 ('Ongoing_anonymous_transaction_count > 1 when there are concurrent transactions.',
72 1, 'SET GTID_NEXT="ANONYMOUS"', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
73 ('',
74 2, '', 'AUTOMATIC', '', 1, '', ''),
75 ('',
76 2, 'SET GTID_NEXT="ANONYMOUS"', 'ANONYMOUS', 'ANONYMOUS', 2, '', ''),
77 ('',
78 3, '', 'AUTOMATIC', '', 2, '', ''),
79 ('',
80 3, 'SET GTID_NEXT="ANONYMOUS"', 'ANONYMOUS', 'ANONYMOUS', 3, '', ''),
81 ('',
82 2, 'reconnect', 'AUTOMATIC', '', 2, '', ''),
83 ('',
84 1, 'COMMIT', 'ANONYMOUS', '', 1, '', ''),
85 ('',
86 3, 'ROLLBACK', 'ANONYMOUS', '', 0, '', ''),
87 ('Set gtid_next (anonymous->automatic) works.',
88 1, 'SET GTID_NEXT="AUTOMATIC"', 'AUTOMATIC', '', 0, '', ''),
89 ('Set gtid_next (automatic->automatic) works.',
90 1, 'SET GTID_NEXT="AUTOMATIC"', 'AUTOMATIC', '', 0, '', ''),
91 ('Can set gtid_mode!=on when Ongoing_anonymous_transaction_count > 0.',
92 2, 'SET GTID_NEXT="ANONYMOUS"', 'ANONYMOUS', 'ANONYMOUS', 1, '', ''),
93 ('',
94 1, 'SET GLOBAL GTID_MODE="OFF_PERMISSIVE"','AUTOMATIC', '', 1, '', ''),
95 ('',
96 1, 'SET GLOBAL GTID_MODE="ON_PERMISSIVE"', 'AUTOMATIC', '', 1, '', ''),
97 ('',
98 1, 'SET GLOBAL GTID_MODE="ON_PERMISSIVE"', 'AUTOMATIC', '', 1, '', ''),
99 ('',
100 1, 'SET GLOBAL GTID_MODE="OFF_PERMISSIVE"','AUTOMATIC', '', 1, '', ''),
101 ('',
102 1, 'SET GLOBAL GTID_MODE="OFF_PERMISSIVE"','AUTOMATIC', '', 1, '', ''),
103 ('',
104 1, 'SET GLOBAL GTID_MODE="OFF"', 'AUTOMATIC', '', 1, '', ''),
105 ('',
106 1, 'SET GLOBAL GTID_MODE="OFF"', 'AUTOMATIC', '', 1, '', ''),
107 ('',
108 2, 'ROLLBACK', 'ANONYMOUS', '', 0, '', '');
109 ==== Test ====
110 ---- Comment ----
111 # Statement 0:
112 [connection server_1_1]
113 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
114 include/assert.inc [GTID_OWNED should be '']
115 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
116 ---- Comment ----
117 # Statement 1:
118 [connection server_1_1]
119 SET GTID_NEXT="ANONYMOUS";
120 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
121 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
122 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
123 ---- Comment ----
124 # Statement 2:
125 [connection server_1_1]
126 CREATE TABLE t1 (a INT);
127 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
128 include/assert.inc [GTID_OWNED should be '']
129 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
130 ---- Comment ----
131 # Statement 3:
132 [connection server_1_1]
133 [START] CREATE TABLE t2 (a INT);
134 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
135 ---- Comment ----
136 # Statement 4:
137 [connection server_1_1]
138 [END] #CREATE TABLE t2 (a INT);
139 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
140 ---- Comment ----
141 # Statement 5:
142 [connection server_1_1]
143 SET GTID_NEXT="ANONYMOUS";
144 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
145 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
146 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
147 ---- Comment ----
148 # Statement 6:
149 [connection server_1_1]
150 BEGIN;
151 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
152 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
153 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
154 # Statement 7:
155 [connection server_1_1]
156 INSERT INTO t1 VALUES (1);
157 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
158 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
159 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
160 ---- Comment ----
161 # Statement 8:
162 [connection server_1_1]
163 COMMIT;
164 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
165 include/assert.inc [GTID_OWNED should be '']
166 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
167 ---- Comment ----
168 # Statement 9:
169 [connection server_1_1]
170 BEGIN;
171 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
172 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
173 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
174 ---- Comment ----
175 # Statement 10:
176 [connection server_1_1]
177 COMMIT;
178 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
179 include/assert.inc [GTID_OWNED should be '']
180 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
181 ---- Comment ----
182 # Statement 11:
183 [connection server_1_1]
184 BEGIN;
185 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
186 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
187 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
188 # Statement 12:
189 [connection server_1_1]
190 ROLLBACK;
191 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
192 include/assert.inc [GTID_OWNED should be '']
193 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
194 ---- Comment ----
195 # Statement 13:
196 [connection server_1_1]
197 BEGIN;
198 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
199 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
200 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
201 # Statement 14:
202 [connection server_1_1]
203 INSERT INTO t1 VALUES (1);
204 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
205 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
206 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
207 # Statement 15:
208 [connection server_1_1]
209 [START] DROP TABLE t2;
210 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
211 # Statement 16:
212 [connection server_1_1]
213 [END] #DROP TABLE t2;
214 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
215 ---- Comment ----
216 # Statement 17:
217 [connection server_1_1]
218 [START] INSERT INTO t1 VALUES (1);
219 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
220 ---- Comment ----
221 # Statement 18:
222 [connection server_1_1]
223 [END] #INSERT INTO t1 VALUES (1);
224 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
225 ---- Comment ----
226 # Statement 19:
227 [connection server_1_1]
228 SET AUTOCOMMIT = 0;
229 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
230 include/assert.inc [GTID_OWNED should be '']
231 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
232 ---- Comment ----
233 # Statement 20:
234 [connection server_1_1]
235 INSERT INTO t1 VALUES (1);
236 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
237 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
238 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
239 # Statement 21:
240 [connection server_1_1]
241 INSERT INTO t1 VALUES (1);
242 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
243 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
244 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
245 # Statement 22:
246 [connection server_1_1]
247 ROLLBACK;
248 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
249 include/assert.inc [GTID_OWNED should be '']
250 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
251 ---- Comment ----
252 # Statement 23:
253 [connection server_1_1]
254 BEGIN;
255 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
256 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
257 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
258 # Statement 24:
259 [connection server_1_1]
260 include/rpl_connect.inc [creating server_1_1]
261 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
262 ---- Comment ----
263 # Statement 25:
264 [connection server_1_1]
265 SET GTID_NEXT="ANONYMOUS";
266 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
267 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
268 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
269 # Statement 26:
270 [connection server_1_2]
271 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
272 include/assert.inc [GTID_OWNED should be '']
273 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
274 # Statement 27:
275 [connection server_1_2]
276 SET GTID_NEXT="ANONYMOUS";
277 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
278 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
279 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 2]
280 # Statement 28:
281 [connection server_1_3]
282 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
283 include/assert.inc [GTID_OWNED should be '']
284 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 2]
285 # Statement 29:
286 [connection server_1_3]
287 SET GTID_NEXT="ANONYMOUS";
288 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
289 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
290 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 3]
291 # Statement 30:
292 [connection server_1_2]
293 include/rpl_connect.inc [creating server_1_2]
294 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 2]
295 # Statement 31:
296 [connection server_1_1]
297 COMMIT;
298 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
299 include/assert.inc [GTID_OWNED should be '']
300 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
301 # Statement 32:
302 [connection server_1_3]
303 ROLLBACK;
304 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
305 include/assert.inc [GTID_OWNED should be '']
306 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
307 ---- Comment ----
308 # Statement 33:
309 [connection server_1_1]
310 SET GTID_NEXT="AUTOMATIC";
311 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
312 include/assert.inc [GTID_OWNED should be '']
313 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
314 ---- Comment ----
315 # Statement 34:
316 [connection server_1_1]
317 SET GTID_NEXT="AUTOMATIC";
318 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
319 include/assert.inc [GTID_OWNED should be '']
320 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
321 ---- Comment ----
322 # Statement 35:
323 [connection server_1_2]
324 SET GTID_NEXT="ANONYMOUS";
325 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
326 include/assert.inc [GTID_OWNED should be 'ANONYMOUS']
327 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
328 # Statement 36:
329 [connection server_1_1]
330 SET GLOBAL GTID_MODE="OFF_PERMISSIVE";
331 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
332 include/assert.inc [GTID_OWNED should be '']
333 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
334 # Statement 37:
335 [connection server_1_1]
336 SET GLOBAL GTID_MODE="ON_PERMISSIVE";
337 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
338 include/assert.inc [GTID_OWNED should be '']
339 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
340 # Statement 38:
341 [connection server_1_1]
342 SET GLOBAL GTID_MODE="ON_PERMISSIVE";
343 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
344 include/assert.inc [GTID_OWNED should be '']
345 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
346 # Statement 39:
347 [connection server_1_1]
348 SET GLOBAL GTID_MODE="OFF_PERMISSIVE";
349 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
350 include/assert.inc [GTID_OWNED should be '']
351 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
352 # Statement 40:
353 [connection server_1_1]
354 SET GLOBAL GTID_MODE="OFF_PERMISSIVE";
355 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
356 include/assert.inc [GTID_OWNED should be '']
357 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
358 # Statement 41:
359 [connection server_1_1]
360 SET GLOBAL GTID_MODE="OFF";
361 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
362 include/assert.inc [GTID_OWNED should be '']
363 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
364 # Statement 42:
365 [connection server_1_1]
366 SET GLOBAL GTID_MODE="OFF";
367 include/assert.inc [GTID_NEXT should be 'AUTOMATIC']
368 include/assert.inc [GTID_OWNED should be '']
369 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 1]
370 # Statement 43:
371 [connection server_1_2]
372 ROLLBACK;
373 include/assert.inc [GTID_NEXT should be 'ANONYMOUS']
374 include/assert.inc [GTID_OWNED should be '']
375 include/assert.inc [ONGOING_ANONYMOUS_TRANSACTION_COUNT should be 0]
376 SET GTID_NEXT = 'ANONYMOUS';
377 SET GLOBAL GTID_MODE = 'OFF_PERMISSIVE';
378 SET GLOBAL GTID_MODE = 'ON_PERMISSIVE';
379 ROLLBACK;
380 SET GLOBAL GTID_MODE = 'ON';
381 SELECT @@GLOBAL.GTID_MODE;
382 @@GLOBAL.GTID_MODE
383 ON
384 SET GTID_NEXT = 'ANONYMOUS';
385 ERROR HY000: @@SESSION.GTID_NEXT cannot be set to ANONYMOUS when @@GLOBAL.GTID_MODE = ON.
386 ==== Clean up ====
387 SET GLOBAL GTID_MODE = 'ON_PERMISSIVE';
388 SET GLOBAL GTID_MODE = 'OFF_PERMISSIVE';
389 SET GLOBAL GTID_MODE = 'OFF';
390 DROP TABLE statements;
391 DROP TABLE t1;
392 SET GLOBAL ENFORCE_GTID_CONSISTENCY = OFF;
393 include/rpl_end.inc