2005-02-23 14:55:16 +01:00
|
|
|
#
|
|
|
|
# misc binlogging tests that do not require a slave running
|
|
|
|
#
|
2006-02-24 17:34:15 +01:00
|
|
|
-- source include/not_embedded.inc
|
2005-02-23 14:55:16 +01:00
|
|
|
-- source include/have_bdb.inc
|
|
|
|
-- source include/have_innodb.inc
|
|
|
|
|
|
|
|
--disable_warnings
|
|
|
|
drop table if exists t1, t2;
|
|
|
|
--enable_warnings
|
2005-02-23 18:26:49 +01:00
|
|
|
reset master;
|
2005-02-23 14:55:16 +01:00
|
|
|
|
|
|
|
create table t1 (a int) engine=bdb;
|
|
|
|
create table t2 (a int) engine=innodb;
|
|
|
|
begin;
|
|
|
|
insert t1 values (5);
|
|
|
|
commit;
|
|
|
|
begin;
|
|
|
|
insert t2 values (5);
|
|
|
|
commit;
|
|
|
|
# first COMMIT must be Query_log_event, second - Xid_log_event
|
2006-02-25 12:24:18 +01:00
|
|
|
--replace_result "xid=21" "xid=12"
|
2005-03-16 21:12:27 +01:00
|
|
|
--replace_column 2 # 5 #
|
|
|
|
show binlog events from 98;
|
2005-02-23 14:55:16 +01:00
|
|
|
drop table t1,t2;
|
|
|
|
|
2005-02-23 20:35:59 +01:00
|
|
|
#
|
|
|
|
# binlog rotation after one big transaction
|
|
|
|
#
|
|
|
|
reset master;
|
|
|
|
let $1=100;
|
|
|
|
|
|
|
|
create table t1 (n int) engine=innodb;
|
|
|
|
begin;
|
|
|
|
--disable_query_log
|
|
|
|
while ($1)
|
|
|
|
{
|
|
|
|
eval insert into t1 values($1 + 4);
|
|
|
|
dec $1;
|
|
|
|
}
|
|
|
|
--enable_query_log
|
|
|
|
commit;
|
|
|
|
drop table t1;
|
2006-02-25 12:24:18 +01:00
|
|
|
--replace_result "xid=32" "xid=19"
|
2005-03-16 21:12:27 +01:00
|
|
|
--replace_column 2 # 5 #
|
|
|
|
show binlog events in 'master-bin.000001' from 98;
|
|
|
|
--replace_column 2 # 5 #
|
|
|
|
show binlog events in 'master-bin.000002' from 98;
|
2005-02-23 20:35:59 +01:00
|
|
|
|