2005-02-23 14:55:16 +01:00
|
|
|
#
|
|
|
|
# misc binlogging tests that do not require a slave running
|
|
|
|
#
|
2005-12-22 06:39:02 +01:00
|
|
|
|
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
|
2005-12-22 06:39:02 +01:00
|
|
|
-- source include/have_debug.inc
|
2005-02-23 14:55:16 +01:00
|
|
|
|
|
|
|
--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
|
2005-03-16 21:12:27 +01:00
|
|
|
--replace_column 2 # 5 #
|
2006-05-17 22:16:51 +02:00
|
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
2005-12-22 06:39:02 +01:00
|
|
|
show binlog events from 102;
|
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;
|
2005-03-16 21:12:27 +01:00
|
|
|
--replace_column 2 # 5 #
|
2006-05-17 22:16:51 +02:00
|
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
2005-12-22 06:39:02 +01:00
|
|
|
show binlog events in 'master-bin.000001' from 102;
|
2005-03-16 21:12:27 +01:00
|
|
|
--replace_column 2 # 5 #
|
2006-05-17 22:16:51 +02:00
|
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
2005-12-22 06:39:02 +01:00
|
|
|
show binlog events in 'master-bin.000002' from 102;
|