mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Fix paths in test and result files
This commit is contained in:
39
mysql-test/suite/binlog/r/binlog_index.result
Normal file
39
mysql-test/suite/binlog/r/binlog_index.result
Normal file
@@ -0,0 +1,39 @@
|
||||
flush logs;
|
||||
flush logs;
|
||||
flush logs;
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
master-bin.000002 #
|
||||
master-bin.000003 #
|
||||
master-bin.000004 #
|
||||
purge binary logs TO 'master-bin.000004';
|
||||
Warnings:
|
||||
Warning 1612 Being purged log ./master-bin.000001 was not found
|
||||
*** must show a list starting from the 'TO' argument of PURGE ***
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000004 #
|
||||
reset master;
|
||||
flush logs;
|
||||
flush logs;
|
||||
flush logs;
|
||||
*** must be a warning master-bin.000001 was not found ***
|
||||
Warnings:
|
||||
Warning 1612 Being purged log ./master-bin.000001 was not found
|
||||
*** must show one record, of the active binlog, left in the index file after PURGE ***
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000004 #
|
||||
reset master;
|
||||
flush logs;
|
||||
flush logs;
|
||||
flush logs;
|
||||
purge binary logs TO 'master-bin.000002';
|
||||
ERROR HY000: Fatal error during log purge
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1377 a problem with deleting ./master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files
|
||||
Error 1377 Fatal error during log purge
|
||||
reset master;
|
||||
End of tests
|
@@ -17,9 +17,11 @@
|
||||
|
||||
source include/have_log_bin.inc;
|
||||
|
||||
copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLTEST_VARDIR/master-data/slave-relay-bin.000001;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
|
||||
write_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.index;
|
||||
copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLD_DATADIR/slave-relay-bin.000001;
|
||||
|
||||
write_file $MYSQLD_DATADIR/slave-relay-bin.index;
|
||||
slave-relay-bin.000001
|
||||
EOF
|
||||
|
||||
@@ -46,8 +48,8 @@ DROP FUNCTION IF EXISTS f1;
|
||||
DROP TRIGGER IF EXISTS tr1;
|
||||
enable_warnings;
|
||||
|
||||
remove_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.000001;
|
||||
remove_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.index;
|
||||
remove_file $MYSQLD_DATADIR/slave-relay-bin.000001;
|
||||
remove_file $MYSQLD_DATADIR/slave-relay-bin.index;
|
||||
stop slave sql_thread;
|
||||
let $keep_connection=1;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
|
67
mysql-test/suite/binlog/t/binlog_index.test
Normal file
67
mysql-test/suite/binlog/t/binlog_index.test
Normal file
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# 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
|
Reference in New Issue
Block a user