1
-- source include/have_binlog_format_row.inc
3
# Write different events to binlog
5
create table t1 (a int);
6
insert into t1 values (1);
7
insert into t1 values (2);
8
insert into t1 values (3);
9
update t1 set a=a+2 where a=2;
10
update t1 set a=a+2 where a=3;
12
create table t2 (word varchar(20));
13
load data infile '../std_data_ln/words.dat' into table t2;
19
--exec $DRIZZLE_BINLOG --hexdump $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
22
# Clear database and restore from binlog
26
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
29
# Verify that all binlog events have been executed
35
# Verify that events larger than the default IO_CACHE buffer
36
# are handled correctly (BUG#25628).
40
create table t2 (word varchar(20));
41
load data infile '../std_data_ln/words.dat' into table t2;
42
insert into t2 select * from t2;
43
insert into t2 select * from t2;
44
insert into t2 select * from t2;
45
insert into t2 select * from t2;
46
insert into t2 select * from t2;
47
insert into t2 select * from t2;
48
insert into t2 select * from t2;
49
insert into t2 select * from t2;
50
insert into t2 select * from t2;
51
select count(*) from t2;
54
--exec $DRIZZLE_BINLOG --hexdump $MYSQLTEST_VARDIR/log/master-bin.000003 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
55
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
58
# Verify that all binlog events have been executed
60
select count(*) from t2;
65
--exec rm $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql