reset master; 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`; 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 utf8mb3_general_ci utf8mb3_unicode_ci utf8mb3_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',_utf8mb3'test' COLLATE 'utf8mb3_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 db SET host='localhost', user='@#@', db='Just a test'; UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@'; DELETE FROM db 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 db SET host='localhost', user='@#@', db='Just a test' master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `mysql`; UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@' master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `mysql`; DELETE FROM db 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 ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); *** 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("BINLOG_BASE64_EVENT.*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; connection default; # # MDEV-25595 DROP part of failed CREATE OR REPLACE is not written into binary log # reset master; create table t as select 1 as b, 2 as b; ERROR 42S21: Duplicate column name 'b' create table t (old_table_field int); create or replace table t as select 1 as b, 2 as b; ERROR 42S21: Duplicate column name 'b' create or replace temporary table t as select 1 as b, 2 as b; ERROR 42S21: Duplicate column name 'b' create table t (new_table_field int); 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 t (old_table_field int) master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t (new_table_field int) drop table t;