Commit 3af5ec99 authored by Venkatesh Duggirala's avatar Venkatesh Duggirala

Bug#16765278 DELETE SQL_LOAD_MB* FILE (TEMP FILE) CREATED

BY BINLOG_KILLED_SIMULATE.TEST
      
'mysqbinlog' tool creates a temporary file while 
preparing LOAD DATA QUERY. These files needs to be deleted
at the end of the test script otherwise these files are
left out in the daily-run machines, causing
"no space on device issues"
      
Fix: 
Delete them at the end of these test scripts
1) execute mysqlbinlog with --local-load option to
create these files in a specified tmpdir
2) delete the tmpdir at the end of the test script
parent 3c9ab1c8
......@@ -20,11 +20,9 @@ reset master;
update t1 set a=2 /* will be "killed" after work has been done */;
# a proof the query is binlogged with no error
#todo: introduce a suite private macro that provides numeric values
# for some constants like the offset of the first real event
# that is different between severs versions.
--let $binlog_load_data= query_get_value(SHOW BINLOG EVENTS, Pos, 2)
let $MYSQLD_DATADIR= `select @@datadir`;
--exec $MYSQL_BINLOG --force-if-open --start-position=106 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--exec $MYSQL_BINLOG --force-if-open --start-position=$binlog_load_data $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
......@@ -48,11 +46,12 @@ reset master;
load data infile '../../std_data/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
--let $binlog_load_data= query_get_value(SHOW BINLOG EVENTS, Pos, 2)
# a proof the query is binlogged with an error
source include/show_binlog_events.inc;
--exec $MYSQL_BINLOG --force-if-open --start-position=98 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--mkdir $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571
--exec $MYSQL_BINLOG --local-load=$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 --force-if-open --start-position=$binlog_load_data $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
......@@ -64,6 +63,8 @@ eval select $error_code /* must return 0 to mean the killed query is in */;
# cleanup for the sub-case
remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 *
--rmdir $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571
drop table t1,t2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment