2
# Write different events to binlog
4
create table t1 (a int);
5
insert into t1 values (1);
6
insert into t1 values (2);
7
insert into t1 values (3);
8
update t1 set a=a+2 where a=2;
9
update t1 set a=a+2 where a=3;
11
create table t2 (word varchar(20));
12
load data infile '../std_data_ln/words.dat' into table t2;
18
--exec $DRIZZLE_BINLOG --hexdump $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
21
# Clear database and restore from binlog
25
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
28
# Verify that all binlog events have been executed
34
# Verify that events larger than the default IO_CACHE buffer
35
# are handled correctly (BUG#25628).
39
create table t2 (word varchar(20));
40
load data infile '../std_data_ln/words.dat' into table t2;
41
insert into t2 select * from 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
select count(*) from t2;
53
--exec $DRIZZLE_BINLOG --hexdump $MYSQLTEST_VARDIR/log/master-bin.000003 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
54
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
57
# Verify that all binlog events have been executed
59
select count(*) from t2;
64
--exec rm $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql