File: binlog_anonymous_ownership.result

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