mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
7674605d79
mysql-test/r/loaddata.result: Update paths in result mysql-test/r/myisam.result: Update paths in result mysql-test/r/partition_not_windows.result: Update paths in result mysql-test/r/symlink.result: Update paths in result mysql-test/suite/binlog/r/binlog_index.result: Update paths in result mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test: Update paths mysql-test/suite/binlog/t/binlog_index.test: Update paths mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Fix merge error s/start-position/stop-position/ mysql-test/t/drop.test: Update paths mysql-test/t/loaddata.test: Update paths mysql-test/t/myisam.test: Update paths mysql-test/t/partition_not_windows.test: Update paths mysql-test/t/symlink.test: Update paths
67 lines
1.4 KiB
Text
67 lines
1.4 KiB
Text
#
|
|
# testing of purging of binary log files bug#18199/Bug#18453
|
|
#
|
|
source include/have_log_bin.inc;
|
|
source include/not_embedded.inc;
|
|
|
|
#
|
|
# testing purge binary logs TO
|
|
#
|
|
|
|
flush logs;
|
|
flush logs;
|
|
flush logs;
|
|
|
|
source include/show_binary_logs.inc;
|
|
|
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
remove_file $MYSQLD_DATADIR/master-bin.000001;
|
|
|
|
# there must be a warning with file names
|
|
purge binary logs TO 'master-bin.000004';
|
|
|
|
--echo *** must show a list starting from the 'TO' argument of PURGE ***
|
|
source include/show_binary_logs.inc;
|
|
|
|
#
|
|
# testing purge binary logs BEFORE
|
|
#
|
|
|
|
reset master;
|
|
|
|
flush logs;
|
|
flush logs;
|
|
flush logs;
|
|
remove_file $MYSQLD_DATADIR/master-bin.000001;
|
|
|
|
--echo *** must be a warning master-bin.000001 was not found ***
|
|
let $date=`select NOW() + INTERVAL 1 MINUTE`;
|
|
--disable_query_log
|
|
eval purge binary logs BEFORE '$date';
|
|
--enable_query_log
|
|
|
|
--echo *** must show one record, of the active binlog, left in the index file after PURGE ***
|
|
source include/show_binary_logs.inc;
|
|
|
|
#
|
|
# testing a fatal error
|
|
# Turning a binlog file into a directory must be a portable setup
|
|
#
|
|
|
|
reset master;
|
|
|
|
flush logs;
|
|
flush logs;
|
|
flush logs;
|
|
|
|
remove_file $MYSQLD_DATADIR/master-bin.000001;
|
|
mkdir $MYSQLD_DATADIR/master-bin.000001;
|
|
|
|
--error ER_BINLOG_PURGE_FATAL_ERR
|
|
purge binary logs TO 'master-bin.000002';
|
|
show warnings;
|
|
rmdir $MYSQLD_DATADIR/master-bin.000001;
|
|
--disable_warnings
|
|
reset master;
|
|
--enable_warnings
|
|
--echo End of tests
|