2
# testing of purging of binary log files bug#18199/Bug#18453
4
source include/have_log_bin.inc;
7
# testing purge binary logs TO
14
source include/show_binary_logs.inc;
16
remove_file $MYSQLTEST_VARDIR/log/master-bin.000001;
18
# there must be a warning with file names
19
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
20
purge binary logs TO 'master-bin.000004';
22
--echo *** must show a list starting from the 'TO' argument of PURGE ***
23
source include/show_binary_logs.inc;
26
# testing purge binary logs BEFORE
34
remove_file $MYSQLTEST_VARDIR/log/master-bin.000001;
36
--echo *** must be a warning master-bin.000001 was not found ***
37
let $date=`select NOW() + INTERVAL 1 MINUTE`;
39
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
40
eval purge binary logs BEFORE '$date';
43
--echo *** must show one record, of the active binlog, left in the index file after PURGE ***
44
source include/show_binary_logs.inc;
47
# testing a fatal error
48
# Turning a binlog file into a directory must be a portable setup
57
remove_file $MYSQLTEST_VARDIR/log/master-bin.000001;
58
mkdir $MYSQLTEST_VARDIR/log/master-bin.000001;
60
--error ER_BINLOG_PURGE_FATAL_ERR
61
purge binary logs TO 'master-bin.000002';
62
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
64
rmdir $MYSQLTEST_VARDIR/log/master-bin.000001;