Commit 6948abb9 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove fil_names_write_bogus

Ever since commit 685d958e
some Perl code in the test mariabackup.huge_lsn is writing names of
non-existing files to the InnoDB redo log and testing the recovery.
We do not need any debug instrumentation to duplicate that test.
parent b884410a
--- innodb-index.result
+++ innodb-index.reject
@@ -1851,6 +1851,7 @@
#
# MDEV-15325 Incomplete validation of missing tablespace during recovery
#
+SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
CREATE TABLE t1(f1 INT PRIMARY KEY)ENGINE=InnoDB;
CREATE TABLE t2(f1 INT PRIMARY KEY)ENGINE=InnoDB;
# Kill the server
#
# Bug#19685095 DO NOT CARE ABOUT UNRESOLVED MLOG_FILE_NAME
# IF THERE ARE NO OPERATIONS TO APPLY
#
SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
# Kill the server
# restart: --debug=d,innodb_log_abort_1 --innodb-log-file-size=4194304
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_5,ib_log --innodb-log-file-size=4194304
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /ib_log: FILE_CHECKPOINT.* written/ in mysqld.1.err
# restart
# restart
DROP TABLE t1;
-- source include/have_innodb.inc -- source include/have_innodb.inc
# Embedded server tests do not support restarting. # Embedded server tests do not support restarting.
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/maybe_debug.inc
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
...@@ -1126,9 +1125,6 @@ drop table t1; ...@@ -1126,9 +1125,6 @@ drop table t1;
--echo # --echo #
--source include/no_checkpoint_start.inc --source include/no_checkpoint_start.inc
if ($have_debug) {
SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
}
CREATE TABLE t1(f1 INT PRIMARY KEY)ENGINE=InnoDB; CREATE TABLE t1(f1 INT PRIMARY KEY)ENGINE=InnoDB;
CREATE TABLE t2(f1 INT PRIMARY KEY)ENGINE=InnoDB; CREATE TABLE t2(f1 INT PRIMARY KEY)ENGINE=InnoDB;
...@@ -1156,13 +1152,6 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED'); ...@@ -1156,13 +1152,6 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
--move_file $MYSQLD_DATADIR/test/t0.ibd $MYSQLD_DATADIR/test/t1.ibd --move_file $MYSQLD_DATADIR/test/t0.ibd $MYSQLD_DATADIR/test/t1.ibd
--source include/start_mysqld.inc --source include/start_mysqld.inc
if ($have_debug) {
# Initiate shutdown in order to issue a redo log checkpoint and to discard
# the redo log record that was emitted due to '+d,fil_names_write_bogus'.
--let $restart_noprint=2
--source include/restart_mysqld.inc
--let $restart_noprint=0
}
SELECT * FROM t1; SELECT * FROM t1;
SELECT * FROM t2; SELECT * FROM t2;
......
--source include/have_innodb.inc
# Embedded server does not support restarting
--source include/not_embedded.inc
--source include/have_debug.inc
--echo #
--echo # Bug#19685095 DO NOT CARE ABOUT UNRESOLVED MLOG_FILE_NAME
--echo # IF THERE ARE NO OPERATIONS TO APPLY
--echo #
SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
--disable_query_log
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
FLUSH TABLES;
--enable_query_log
--let $change=`SELECT if(@@innodb_log_file_size = 4194304, 8388608, 4194304)`
--let $resize= --innodb-log-file-size=$change
--source include/no_checkpoint_start.inc
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
--let CLEANUP_IF_CHECKPOINT=DROP TABLE t1;
--source include/no_checkpoint_end.inc
--let $restart_parameters= --debug=d,innodb_log_abort_1 $resize
--source include/start_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
--let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let SEARCH_PATTERN = InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either
--source include/search_pattern_in_file.inc
--let $restart_parameters= --debug=d,innodb_log_abort_5,ib_log $resize
--source include/restart_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
--let SEARCH_PATTERN= ib_log: FILE_CHECKPOINT.* written
--source include/search_pattern_in_file.inc
--let $restart_parameters=
--source include/restart_mysqld.inc
# Initiate shutdown in order to issue a redo log checkpoint and to discard
# the redo log record that was emitted due to '+d,fil_names_write_bogus'.
--source include/restart_mysqld.inc
DROP TABLE t1;
...@@ -3077,10 +3077,6 @@ ATTRIBUTE_NOINLINE ATTRIBUTE_COLD void mtr_t::name_write() ...@@ -3077,10 +3077,6 @@ ATTRIBUTE_NOINLINE ATTRIBUTE_COLD void mtr_t::name_write()
fil_name_write(m_user_space->id, fil_name_write(m_user_space->id,
UT_LIST_GET_FIRST(m_user_space->chain)->name, UT_LIST_GET_FIRST(m_user_space->chain)->name,
&mtr); &mtr);
DBUG_EXECUTE_IF("fil_names_write_bogus",
{fil_name_write(SRV_SPACE_ID_UPPER_BOUND,
"./test/bogus file.ibd", &mtr);});
mtr.commit_files(); mtr.commit_files();
} }
......
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