summaryrefslogtreecommitdiff
path: root/mysql-test/suite/binlog/r/binlog_stm_binlog.result
blob: 872ba40e05fa34ec5f45f10f3da7108b145137ac (plain)
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
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
drop table if exists t1;
create table t1 (a int, b int) engine=innodb;
begin;
insert into t1 values (1,2);
commit;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (1,2)
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
drop table t1;
drop table if exists t1, t2;
reset master;
create table t1 (a int) engine=innodb;
create table t2 (a int) engine=innodb;
begin;
insert t1 values (5);
commit;
begin;
insert t2 values (5);
commit;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int) engine=innodb
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t2 (a int) engine=innodb
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert t1 values (5)
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert t2 values (5)
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
drop table t1,t2;
reset master;
create table t1 (n int) engine=innodb;
begin;
commit;
drop table t1;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (n int) engine=innodb
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(100 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(99 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(98 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(97 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(96 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(95 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(94 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(93 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(92 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(91 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(90 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(89 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(88 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(87 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(86 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(85 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(84 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(83 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(82 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(81 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(80 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(79 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(78 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(77 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(76 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(75 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(74 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(73 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(72 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(71 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(70 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(69 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(68 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(67 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(66 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(65 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(64 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(63 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(62 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(61 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(60 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(59 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(58 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(57 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(56 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(55 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(54 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(53 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(52 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(51 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(50 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(49 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(48 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(47 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(46 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(45 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(44 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(43 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(42 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(41 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(40 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(39 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(38 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(37 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(36 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(35 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(34 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(33 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(32 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(31 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(30 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(29 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(28 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(27 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(26 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(25 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(24 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(23 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(22 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(21 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(20 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(19 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(18 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(17 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(16 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(15 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(14 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(13 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(12 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(11 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(10 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(9 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(8 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(7 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(6 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(5 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(4 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(3 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(2 + 4)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(1 + 4)
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=POS
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000002	#	Binlog_checkpoint	#	#	master-bin.000002
master-bin.000002	#	Gtid	#	#	GTID #-#-#
master-bin.000002	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
set @ac = @@autocommit;
set autocommit= 0;
reset master;
create table t1(n int) engine=innodb;
begin;
insert into t1 values (1);
insert into t1 values (2);
insert into t1 values (3);
commit;
drop table t1;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1(n int) engine=innodb
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (1)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (2)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (3)
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
set @bcs = @@binlog_cache_size;
set global binlog_cache_size=4096;
reset master;
create table t1 (a int, b char(255)) engine=innodb;
flush status;
show status like "binlog_cache_use";
Variable_name	Value
Binlog_cache_use	0
*** the following must show the counter value = 1 ***
Variable_name	Value
Binlog_cache_use	1
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int, b char(255)) engine=innodb
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; flush status
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 100, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 99, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 98, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 97, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 96, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 95, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 94, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 93, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 92, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 91, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 90, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 89, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 88, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 87, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 86, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 85, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 84, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 83, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 82, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 81, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 80, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 79, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 78, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 77, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 76, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 75, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 74, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 73, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 72, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 71, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 70, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 69, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 68, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 67, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 66, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 65, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 64, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 63, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 62, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 61, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 60, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 59, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 58, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 57, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 56, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 55, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 54, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 53, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 52, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 51, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 50, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 49, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 48, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 47, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 46, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 45, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 44, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 43, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 42, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 41, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 40, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 39, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 38, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 37, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 36, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 35, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 34, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 33, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 32, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 31, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 30, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 29, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 28, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 27, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 26, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 25, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 24, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 23, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 22, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 21, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 20, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 19, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 18, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 17, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 16, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 15, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 14, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 13, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 12, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 11, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 10, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 9, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 8, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 7, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 6, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 5, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 4, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 3, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 2, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 1, 'just to fill void to make transaction occupying at least two buffers of the trans cache' )
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=POS
drop table t1;
set global binlog_cache_size=@bcs;
set session autocommit = @ac;
drop table if exists t1;
reset master;
create table t1 (a bigint unsigned, b bigint(20) unsigned);
prepare stmt from "insert into t1 values (?,?)";
set @a= 9999999999999999;
set @b= 14632475938453979136;
execute stmt using @a, @b;
deallocate prepare stmt;
drop table t1;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (9999999999999999,14632475938453979136)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
reset master;
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE bug39182;
CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE PROCEDURE p1()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT 
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END//
CALL p1();
c1	c2	c3	d1	d2	d3
utf8_general_ci	utf8_unicode_ci	utf8_unicode_ci	2	2	2
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `bug39182`; CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `bug39182`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT 
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `bug39182`; CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%",  NAME_CONST('s1',_utf8'test' COLLATE 'utf8_unicode_ci'), "%")
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `bug39182`; DROP TEMPORARY TABLE `tmp1` /* generated by server */
DROP PROCEDURE p1;
DROP TABLE t1;
DROP DATABASE bug39182;
USE test;
CREATE PROCEDURE p1(IN v1 INT)
BEGIN
CREATE TABLE t1 SELECT v1;
DROP TABLE t1;
END//
CREATE PROCEDURE p2()
BEGIN
DECLARE v1 INT;
CREATE TABLE t1 SELECT v1+1;
DROP TABLE t1;
END//
CREATE PROCEDURE p3(IN v1 INT)
BEGIN
CREATE TABLE t1 SELECT 1 FROM DUAL WHERE v1!=0;
DROP TABLE t1;
END//
CREATE PROCEDURE p4(IN v1 INT)
BEGIN
DECLARE v2 INT;
CREATE TABLE t1 SELECT 1, v1, v2;
DROP TABLE t1;
CREATE TABLE t1 SELECT 1, v1+1, v2;
DROP TABLE t1;
END//
CALL p1(1);
CALL p2();
CALL p3(0);
CALL p4(0);
DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP PROCEDURE p3;
DROP PROCEDURE p4;
End of 5.0 tests
reset master;
create table t1 (id tinyint auto_increment primary key);
insert into t1 values(5);
set insert_id=128;
insert into t1 values(null) /* Not binlogged */;
ERROR 22003: Out of range value for column 'id' at row 1
set insert_id=128;
insert ignore into t1 values(null) /* Insert 128 */;
Warnings:
Warning	167	Out of range value for column 'id' at row 1
set insert_id=5;
insert into t1 values(null) /* Not binlogged */;
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
set insert_id=5;
insert ignore into t1 values(null) /* Insert 5 */;
Warnings:
Warning	1062	Duplicate entry '5' for key 'PRIMARY'
select * from t1;
id
5
drop table t1;
create table t1 (id tinyint auto_increment primary key) engine=myisam;
set insert_id=128;
insert into t1 values(5),(null) /* Insert_id 128 */;
ERROR 22003: Out of range value for column 'id' at row 2
set insert_id=128;
insert ignore into t1 values (4),(null) /* Insert_id 128 */;
Warnings:
Warning	167	Out of range value for column 'id' at row 2
set insert_id=5;
insert into t1 values(3),(null) /* Insert_id 5 */;
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
set insert_id=5;
insert ignore into t1 values(2),(null) /* Insert_id 5 */;
Warnings:
Warning	1062	Duplicate entry '5' for key 'PRIMARY'
select * from t1 order by id;
id
2
3
4
5
drop table t1;
create table t1 (a int);
create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
USE mysql;
INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@';
use test;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(5)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=128
master-bin.000001	#	Query	#	#	use `test`; insert ignore into t1 values(null) /* Insert 128 */
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=5
master-bin.000001	#	Query	#	#	use `test`; insert ignore into t1 values(null) /* Insert 5 */
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (id tinyint auto_increment primary key) engine=myisam
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=128
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(5),(null) /* Insert_id 128 */
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=128
master-bin.000001	#	Query	#	#	use `test`; insert ignore into t1 values (4),(null) /* Insert_id 128 */
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=5
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(3),(null) /* Insert_id 5 */
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=5
master-bin.000001	#	Query	#	#	use `test`; insert ignore into t1 values(2),(null) /* Insert_id 5 */
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table if not exists t2 select * from t1
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create temporary table tt1 (a int)
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table if not exists t3 like tt1
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `mysql`; INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test')
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=POS
drop table t1,t2,t3,tt1;
reset master;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
insert /*! delayed */ into t1 values (null);
insert delayed into t1 values (300);
FLUSH TABLES;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; FLUSH TABLES
RESET MASTER;
insert /* before delayed */ delayed /* after delayed */ into t1 values (null),(null),(null),(null);
insert  /*! delayed */ into t1 values (null),(null),(400),(null);
select * from t1;
a
207
208
300
301
302
303
304
305
306
400
401
drop table t1;
reset master;
drop table if exists t3;
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
File master-bin.000001
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
*** show new binlog index after rotating ***
File master-bin.000002
drop table t3;
#
# Bug #45998: database crashes when running "create as select"
#
CREATE DATABASE test1;
USE test1;
DROP DATABASE test1;
CREATE TABLE test.t1(a int);
INSERT INTO test.t1 VALUES (1), (2);
CREATE TABLE test.t2 SELECT * FROM test.t1;
USE test;
DROP TABLES t1, t2;
connect  fresh,localhost,root,,test;
connection fresh;
RESET MASTER;
CREATE TABLE t1 (a INT PRIMARY KEY);
BINLOG '
3u9kSA8KAAAAZgAAAGoAAAABAAQANS4xLjM1LW1hcmlhLWJldGExLWRlYnVnLWxvZwAAAAAAAAAA
AAAAAAAAAAAAAAAAAADe72RIEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
';
INSERT INTO t1 VALUES (1);
BINLOG '
3u9kSBMUAAAAKQAAAJEBAAAAABoAAAAAAAAABHRlc3QAAnQxAAEDAAA=
3u9kSBcUAAAAIgAAALMBAAAQABoAAAAAAAEAAf/+AgAAAA==
';
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
#	#	Format_desc	1	#	Server ver: #, Binlog ver: #
#	#	Gtid_list	1	#	[]
#	#	Binlog_checkpoint	1	#	master-bin.000001
#	#	Gtid	1	#	GTID 0-1-1
#	#	Query	1	#	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY)
#	#	Gtid	1	#	BEGIN GTID 0-1-2
#	#	Query	1	#	use `test`; INSERT INTO t1 VALUES (1)
#	#	Query	1	#	COMMIT
#	#	Gtid	1	#	BEGIN GTID 0-1-3
#	#	Annotate_rows	1	#	BINLOG '
3u9kSBMUAAAAKQAAAJEBAAAAABoAAAAAAAAABHRlc3QAAnQxAAEDAAA=
3u9kSBcUAAAAIgAAALMBAAAQABoAAAAAAAEAAf/+AgAAAA==
'
#	#	Table_map	1	#	table_id: # (test.t1)
#	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
#	#	Query	1	#	COMMIT
DROP TABLE t1;

# BUG#54903 BINLOG statement toggles session variables
# ----------------------------------------------------------------------
# This test verify that BINLOG statement doesn't change current session's
# variables foreign_key_checks and unique_checks.

CREATE TABLE t1 (c1 INT KEY);
SET @@SESSION.foreign_key_checks= ON;
SET @@SESSION.unique_checks= ON;
# INSERT INTO t1 VALUES (1)
# foreign_key_checks=0 and unique_checks=0
BINLOG '
dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
';
SELECT * FROM t1;
c1
1
# Their values should be ON
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
Variable_name	Value
foreign_key_checks	ON
SHOW SESSION VARIABLES LIKE "unique_checks";
Variable_name	Value
unique_checks	ON

SET @@SESSION.foreign_key_checks= OFF;
SET @@SESSION.unique_checks= OFF;
# INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1
BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
';
SELECT * FROM t1;
c1
1
2
# Their values should be OFF
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
Variable_name	Value
foreign_key_checks	OFF
SHOW SESSION VARIABLES LIKE "unique_checks";
Variable_name	Value
unique_checks	OFF
# INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1
# It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows_v1 event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
';
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
SELECT * FROM t1;
c1
1
2
# Their values should be OFF
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
Variable_name	Value
foreign_key_checks	OFF
SHOW SESSION VARIABLES LIKE "unique_checks";
Variable_name	Value
unique_checks	OFF
DROP TABLE t1;
disconnect fresh;