~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/mysqlbinlog_base64.test

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
#  Write different events to binlog
3
 
#
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;
10
 
 
11
 
create table t2 (word varchar(20));
12
 
load data infile '../std_data_ln/words.dat' into table t2;
13
 
 
14
 
#
15
 
#  Save binlog
16
 
#
17
 
flush logs;
18
 
--exec $DRIZZLE_BINLOG --hexdump $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
19
 
 
20
 
#
21
 
#  Clear database and restore from binlog
22
 
#
23
 
drop table t1;
24
 
drop table t2;
25
 
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
26
 
 
27
 
#
28
 
#  Verify that all binlog events have been executed
29
 
#
30
 
select * from t1;
31
 
select * from t2;
32
 
 
33
 
#
34
 
#  Verify that events larger than the default IO_CACHE buffer
35
 
#  are handled correctly (BUG#25628).
36
 
#
37
 
flush logs;
38
 
drop table t2;
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;
51
 
 
52
 
flush logs;
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
55
 
 
56
 
#
57
 
#  Verify that all binlog events have been executed
58
 
#
59
 
select count(*) from t2;
60
 
 
61
 
#
62
 
#  Test cleanup
63
 
#
64
 
--exec rm $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
65
 
drop table t1;
66
 
drop table t2;