create table t1 (a int, b int) engine=innodb;
begin;
insert into t1 values (1,2);
commit;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001	#	Query	#	#	BEGIN
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;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int) engine=innodb
master-bin.000001	#	Query	#	#	use `test`; create table t2 (a int) engine=innodb
master-bin.000001	#	Query	#	#	BEGIN
master-bin.000001	#	Query	#	#	use `test`; insert t1 values (5)
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
master-bin.000001	#	Query	#	#	BEGIN
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;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create table t1 (n int) engine=innodb
master-bin.000001	#	Query	#	#	BEGIN
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=4
show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000002	#	Query	#	#	use `test`; drop table t1
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;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create table t1(n int) engine=innodb
master-bin.000001	#	Query	#	#	BEGIN
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	#	Query	#	#	use `test`; drop table t1
set @bcs = @@binlog_cache_size;
set global binlog_cache_size=4096;
reset master;
create table t1 (a int) engine=innodb;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int) engine=innodb
master-bin.000001	#	Query	#	#	BEGIN
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 400 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 399 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 398 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 397 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 396 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 395 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 394 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 393 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 392 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 391 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 390 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 389 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 388 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 387 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 386 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 385 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 384 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 383 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 382 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 381 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 380 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 379 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 378 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 377 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 376 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 375 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 374 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 373 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 372 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 371 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 370 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 369 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 368 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 367 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 366 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 365 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 364 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 363 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 362 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 361 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 360 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 359 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 358 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 357 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 356 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 355 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 354 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 353 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 352 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 351 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 350 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 349 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 348 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 347 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 346 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 345 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 344 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 343 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 342 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 341 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 340 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 339 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 338 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 337 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 336 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 335 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 334 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 333 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 332 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 331 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 330 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 329 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 328 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 327 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 326 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 325 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 324 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 323 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 322 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 321 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 320 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 319 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 318 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 317 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 316 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 315 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 314 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 313 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 312 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 311 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 310 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 309 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 308 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 307 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 306 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 305 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 304 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 303 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 302 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 301 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 300 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 299 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 298 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 297 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 296 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 295 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 294 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 293 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 292 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 291 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 290 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 289 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 288 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 287 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 286 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 285 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 284 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 283 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 282 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 281 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 280 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 279 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 278 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 277 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 276 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 275 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 274 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 273 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 272 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 271 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 270 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 269 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 268 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 267 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 266 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 265 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 264 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 263 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 262 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 261 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 260 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 259 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 258 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 257 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 256 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 255 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 254 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 253 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 252 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 251 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 250 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 249 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 248 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 247 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 246 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 245 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 244 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 243 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 242 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 241 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 240 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 239 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 238 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 237 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 236 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 235 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 234 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 233 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 232 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 231 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 230 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 229 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 228 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 227 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 226 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 225 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 224 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 223 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 222 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 221 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 220 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 219 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 218 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 217 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 216 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 215 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 214 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 213 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 212 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 211 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 210 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 209 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 208 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 207 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 206 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 205 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 204 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 203 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 202 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 201 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 200 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 199 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 198 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 197 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 196 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 195 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 194 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 193 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 192 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 191 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 190 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 189 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 188 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 187 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 186 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 185 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 184 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 183 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 182 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 181 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 180 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 179 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 178 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 177 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 176 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 175 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 174 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 173 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 172 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 171 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 170 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 169 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 168 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 167 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 166 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 165 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 164 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 163 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 162 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 161 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 160 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 159 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 158 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 157 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 156 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 155 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 154 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 153 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 152 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 151 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 150 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 149 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 148 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 147 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 146 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 145 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 144 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 143 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 142 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 141 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 140 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 139 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 138 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 137 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 136 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 135 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 134 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 133 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 132 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 131 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 130 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 129 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 128 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 127 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 126 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 125 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 124 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 123 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 122 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 121 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 120 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 119 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 118 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 117 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 116 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 115 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 114 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 113 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 112 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 111 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 110 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 109 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 108 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 107 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( <binlog_start> )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 105 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 104 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 103 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 102 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 101 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 100 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 99 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 98 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 97 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 96 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 95 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 94 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 93 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 92 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 91 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 90 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 89 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 88 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 87 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 86 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 85 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 84 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 83 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 82 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 81 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 80 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 79 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 78 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 77 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 76 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 75 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 74 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 73 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 72 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 71 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 70 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 69 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 68 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 67 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 66 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 65 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 64 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 63 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 62 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 61 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 60 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 59 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 58 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 57 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 56 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 55 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 54 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 53 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 52 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 51 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 50 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 49 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 48 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 47 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 46 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 45 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 44 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 43 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 42 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 41 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 40 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 39 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 38 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 37 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 36 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 35 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 34 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 33 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 32 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 31 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 30 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 29 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 28 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 27 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 26 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 25 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 24 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 23 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 22 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 21 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 20 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 19 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 18 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 17 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 16 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 15 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 14 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 13 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 12 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 11 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 10 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 9 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 8 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 7 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 6 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 5 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 4 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 3 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 2 )
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 1 )
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
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;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (9999999999999999,14632475938453979136)
master-bin.000001	#	Query	#	#	use `test`; drop table t1
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
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
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	#	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	#	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	#	Query	#	#	use `bug39182`; DROP TEMPORARY TABLE tmp1
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);
set insert_id=128;
insert into t1 values(null);
Warnings:
Warning	1264	Out of range value for column 'id' at row 1
select * from t1;
id
127
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 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;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001	#	Intvar	#	#	INSERT_ID=127
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(null)
master-bin.000001	#	Query	#	#	use `test`; drop table t1
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)
master-bin.000001	#	Query	#	#	use `test`; create table if not exists t2 select * from t1
master-bin.000001	#	Query	#	#	use `test`; create temporary table tt1 (a int)
master-bin.000001	#	Query	#	#	use `test`; create table if not exists t3 like tt1
master-bin.000001	#	Query	#	#	use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test')
master-bin.000001	#	Query	#	#	use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
master-bin.000001	#	Query	#	#	use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
drop table t1,t2,t3,tt1;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
insert delayed into t1 values (207);
insert delayed into t1 values (null);
insert delayed into t1 values (300);
FLUSH TABLES;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001	#	Intvar	#	#	INSERT_ID=127
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(null)
master-bin.000001	#	Query	#	#	use `test`; drop table t1
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)
master-bin.000001	#	Query	#	#	use `test`; create table if not exists t2 select * from t1
master-bin.000001	#	Query	#	#	use `test`; create temporary table tt1 (a int)
master-bin.000001	#	Query	#	#	use `test`; create table if not exists t3 like tt1
master-bin.000001	#	Query	#	#	use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test')
master-bin.000001	#	Query	#	#	use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
master-bin.000001	#	Query	#	#	use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
master-bin.000001	#	Query	#	#	use `test`; drop table t1,t2,t3,tt1
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
master-bin.000001	#	Query	#	#	BEGIN
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Query	#	#	BEGIN
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Query	#	#	BEGIN
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Query	#	#	use `test`; FLUSH TABLES
insert 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;
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000002	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
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;
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: #
#	#	Query	1	#	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY)
#	#	Query	1	#	use `test`; INSERT INTO t1 VALUES (1)
#	#	Query	1	#	BEGIN
#	#	Table_map	1	#	table_id: # (test.t1)
#	#	Write_rows	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 "%_checks";
Variable_name	Value
foreign_key_checks	ON
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 "%_checks";
Variable_name	Value
foreign_key_checks	OFF
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 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 "%_checks";
Variable_name	Value
foreign_key_checks	OFF
unique_checks	OFF
DROP TABLE t1;
