| 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 AS Loaded; |
| 9 |
Loaded |
| 10 |
1 |
| 11 |
Warnings: |
| 12 |
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'. |
| 13 |
select 1 /* must return 1 as query completed before got killed*/; |
| 14 |
1 |
| 15 |
1 |
| 16 |
create table t2 (a int, b int) ENGINE=MyISAM; |
| 17 |
reset master; |
| 18 |
load data infile '../../std_data/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */; |
| 19 |
ERROR 70100: Query execution was interrupted |
| 20 |
include/show_binlog_events.inc |
| 21 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 22 |
binlog.000001 # Query # # BEGIN |
| 23 |
binlog.000001 # Begin_load_query # # ;file_id=#;block_len=# |
| 24 |
binlog.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`) ;file_id=# |
| 25 |
binlog.000001 # Query # # COMMIT |
| 26 |
select |
| 27 |
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) |
| 28 |
is not null AS Loaded; |
| 29 |
Loaded |
| 30 |
1 |
| 31 |
Warnings: |
| 32 |
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'. |
| 33 |
select 0 /* must return 0 to mean the killed query is in */; |
| 34 |
0 |
| 35 |
0 |
| 36 |
drop table t1,t2; |
| 37 |
end of the tests |