~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
-- source include/have_binlog_format_row.inc
2
-- source include/have_debug.inc
3
-- source include/master-slave.inc
4
5
# master is asked to create small Rows events: if only one event is
6
# created, stopping slave at the end of that one will show no bug, we
7
# need at least two (and stop after first); in this test we use three.
8
9
connection master;
10
create table t1 (words varchar(20)) engine=myisam;
11
12
load data infile '../std_data_ln/words.dat' into table t1 (words);
13
select count(*) from t1;
14
save_master_pos;
15
16
connection slave;
17
18
# slave will automatically tell itself to stop thanks to the .opt
19
# file; it will initiate the stop request after the first
20
# Rows_log_event (out of 3) but should wait until the last one is
21
# executed before stopping.
22
23
wait_for_slave_to_stop;
24
25
# check that we inserted all rows (waited until the last Rows event)
26
select count(*) from t1;
27
28
connection master;
29
drop table t1;
30
connection slave; # slave SQL thread is stopped
31
drop table t1;