~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
drop table if exists t1,t2;
2
create table t1  (a int) engine=MyISAM;
3
insert into t1 set a=1;
4
reset master;
5
update t1 set a=2 /* will be "killed" after work has been done */;
6
select
7
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
8
is not null;
9
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
10
is not null
11
1
12
select 1 /* must return 1 as query completed before got killed*/;
13
1
14
1
15
create table t2 (a int, b int) ENGINE=MyISAM;
16
reset master;
17
load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
18
ERROR 70100: Query execution was interrupted
19
show binlog events from <binlog_start>;
20
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
21
master-bin.000001	#	Begin_load_query	#	#	;file_id=#;block_len=12
22
master-bin.000001	#	Execute_load_query	#	#	use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */ ;file_id=#
23
select
24
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
25
is not null;
26
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
27
is not null
28
1
29
select 0 /* must return 0 to mean the killed query is in */;
30
0
31
0
32
drop table t1,t2;
33
end of the tests