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 98;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	1	#	use `test`; create table t1 (a int) engine=innodb
master-bin.000001	#	Query	1	#	use `test`; create table t2 (a int) engine=innodb
master-bin.000001	#	Query	1	#	use `test`; BEGIN
master-bin.000001	#	Query	1	#	use `test`; insert t1 values (5)
master-bin.000001	#	Xid	1	#	COMMIT /* XID */
master-bin.000001	#	Query	1	#	use `test`; BEGIN
master-bin.000001	#	Query	1	#	use `test`; insert t2 values (5)
master-bin.000001	#	Xid	1	#	COMMIT /* XID */
drop table t1,t2;
reset master;
create table t1 (n int) engine=innodb;
begin;
commit;
drop table t1;
show binlog events in 'master-bin.000001' from 98;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	1	#	use `test`; create table t1 (n int) engine=innodb
master-bin.000001	#	Query	1	#	use `test`; BEGIN
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(100 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(99 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(98 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(97 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(96 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(95 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(94 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(93 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(92 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(91 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(90 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(89 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(88 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(87 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(86 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(85 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(84 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(83 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(82 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(81 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(80 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(79 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(78 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(77 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(76 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(75 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(74 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(73 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(72 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(71 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(70 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(69 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(68 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(67 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(66 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(65 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(64 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(63 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(62 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(61 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(60 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(59 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(58 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(57 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(56 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(55 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(54 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(53 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(52 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(51 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(50 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(49 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(48 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(47 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(46 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(45 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(44 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(43 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(42 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(41 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(40 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(39 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(38 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(37 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(36 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(35 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(34 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(33 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(32 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(31 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(30 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(29 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(28 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(27 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(26 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(25 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(24 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(23 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(22 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(21 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(20 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(19 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(18 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(17 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(16 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(15 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(14 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(13 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(12 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(11 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(10 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(9 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(8 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(7 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(6 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(5 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(4 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(3 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(2 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(1 + 4)
master-bin.000001	#	Xid	1	#	COMMIT /* XID */
master-bin.000001	#	Rotate	1	#	master-bin.000002;pos=4
show binlog events in 'master-bin.000002' from 98;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000002	#	Query	1	#	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 0;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	98	Server version, Binlog ver: 4
master-bin.000001	98	Query	1	197	use `test`; create table t1(n int) engine=innodb
master-bin.000001	197	Query	1	265	use `test`; BEGIN
master-bin.000001	265	Query	1	353	use `test`; insert into t1 values (1)
master-bin.000001	353	Query	1	441	use `test`; insert into t1 values (2)
master-bin.000001	441	Query	1	529	use `test`; insert into t1 values (3)
master-bin.000001	529	Xid	1	556	COMMIT /* XID */
master-bin.000001	556	Query	1	632	use `test`; drop table t1
set autocommit= 1;
reset master;
create table t1(n int) engine=innodb;
insert into t1 values (1);
insert into t1 values (2);
insert into t1 values (3);
commit;
drop table t1;
show binlog events from 0;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	98	Server version, Binlog ver: 4
master-bin.000001	98	Query	1	197	use `test`; create table t1(n int) engine=innodb
master-bin.000001	197	Query	1	285	use `test`; insert into t1 values (1)
master-bin.000001	285	Xid	1	312	COMMIT /* XID */
master-bin.000001	312	Query	1	400	use `test`; insert into t1 values (2)
master-bin.000001	400	Xid	1	427	COMMIT /* XID */
master-bin.000001	427	Query	1	515	use `test`; insert into t1 values (3)
master-bin.000001	515	Xid	1	542	COMMIT /* XID */
master-bin.000001	542	Query	1	618	use `test`; drop table t1
reset master;
create table t1(n int) engine=myisam;
begin;
insert into t1 values (4);
insert into t1 values (5);
insert into t1 values (6);
commit;
drop table t1;
show binlog events from 0;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	98	Server version, Binlog ver: 4
master-bin.000001	98	Query	1	197	use `test`; create table t1(n int) engine=myisam
master-bin.000001	197	Query	1	285	use `test`; insert into t1 values (4)
master-bin.000001	285	Query	1	373	use `test`; insert into t1 values (5)
master-bin.000001	373	Query	1	461	use `test`; insert into t1 values (6)
master-bin.000001	461	Query	1	537	use `test`; drop table t1
set autocommit= 1;
reset master;
create table t1(n int) engine=innodb;
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	197		
insert into t1 values (1);
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	312		
insert into t1 values (2);
insert into t1 values (3);
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	542		
commit;
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	542		
drop table t1;
show binlog events from 0;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	98	Server version, Binlog ver: 4
master-bin.000001	98	Query	1	197	use `test`; create table t1(n int) engine=innodb
master-bin.000001	197	Query	1	285	use `test`; insert into t1 values (1)
master-bin.000001	285	Xid	1	312	COMMIT /* XID */
master-bin.000001	312	Query	1	400	use `test`; insert into t1 values (2)
master-bin.000001	400	Xid	1	427	COMMIT /* XID */
master-bin.000001	427	Query	1	515	use `test`; insert into t1 values (3)
master-bin.000001	515	Xid	1	542	COMMIT /* XID */
master-bin.000001	542	Query	1	618	use `test`; drop table t1
set autocommit= 0;
reset master;
create table t1(n int) engine=myisam;
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	197		
insert into t1 values (4);
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	285		
insert into t1 values (5);
insert into t1 values (6);
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	461		
commit;
show master status;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	461		
drop table t1;
show binlog events from 0;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	98	Server version, Binlog ver: 4
master-bin.000001	98	Query	1	197	use `test`; create table t1(n int) engine=myisam
master-bin.000001	197	Query	1	285	use `test`; insert into t1 values (4)
master-bin.000001	285	Query	1	373	use `test`; insert into t1 values (5)
master-bin.000001	373	Query	1	461	use `test`; insert into t1 values (6)
master-bin.000001	461	Query	1	537	use `test`; drop table t1
set session autocommit = @ac;
End of 5.0 tests