Commit 6d40274f authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.5 into 10.6

parents 46f8c46e 165564d3
call mtr.add_suppression("mariadbd.*: File .*"); call mtr.add_suppression("mariadbd.*: File ");
call mtr.add_suppression("Plugin 'file_key_management' .*"); call mtr.add_suppression("Plugin 'file_key_management' ");
call mtr.add_suppression("InnoDB: We do not continue the crash recovery"); call mtr.add_suppression("InnoDB: Recovery cannot access file");
call mtr.add_suppression("InnoDB: Plugin initialization aborted"); call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\."); call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed."); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
# embedded does not support restart # embedded does not support restart
-- source include/not_embedded.inc -- source include/not_embedded.inc
call mtr.add_suppression("mariadbd.*: File .*"); call mtr.add_suppression("mariadbd.*: File ");
call mtr.add_suppression("Plugin 'file_key_management' .*"); call mtr.add_suppression("Plugin 'file_key_management' ");
call mtr.add_suppression("InnoDB: We do not continue the crash recovery"); call mtr.add_suppression("InnoDB: Recovery cannot access file");
call mtr.add_suppression("InnoDB: Plugin initialization aborted"); call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\."); call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed."); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
......
...@@ -12,7 +12,7 @@ check table t1; ...@@ -12,7 +12,7 @@ check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index 'b' contains 990 entries, should be 1024. test.t1 check Warning InnoDB: Index 'b' contains 990 entries, should be 1024.
test.t1 check error Corrupt test.t1 check error Corrupt
# restart # restart: --innodb-force_recovery=0
SET GLOBAL innodb_fast_shutdown=0; SET GLOBAL innodb_fast_shutdown=0;
# restart # restart: --innodb-force_recovery=0
DROP TABLE t1; DROP TABLE t1;
...@@ -11,6 +11,8 @@ call mtr.add_suppression("InnoDB: Failed to find tablespace for table `test`\\.` ...@@ -11,6 +11,8 @@ call mtr.add_suppression("InnoDB: Failed to find tablespace for table `test`\\.`
call mtr.add_suppression("InnoDB: Allocated tablespace ID \\d+ for test.t1, old maximum was"); call mtr.add_suppression("InnoDB: Allocated tablespace ID \\d+ for test.t1, old maximum was");
call mtr.add_suppression("InnoDB: Failed to find tablespace for table `mysql`\\.`transaction_registry` in the cache\\. Attempting to load the tablespace with space id"); call mtr.add_suppression("InnoDB: Failed to find tablespace for table `mysql`\\.`transaction_registry` in the cache\\. Attempting to load the tablespace with space id");
call mtr.add_suppression("InnoDB: Allocated tablespace ID \\d+ for mysql.transaction_registry, old maximum was"); call mtr.add_suppression("InnoDB: Allocated tablespace ID \\d+ for mysql.transaction_registry, old maximum was");
call mtr.add_suppression("InnoDB: Trying to read 4096 bytes");
call mtr.add_suppression("InnoDB: File './test/t1.ibd' is corrupted");
--enable_query_log --enable_query_log
CREATE TABLE t1( CREATE TABLE t1(
...@@ -106,7 +108,7 @@ truncate(FILE, $ps * $pages); ...@@ -106,7 +108,7 @@ truncate(FILE, $ps * $pages);
close(FILE) || die "Unable to close $file"; close(FILE) || die "Unable to close $file";
EOF EOF
--let $restart_parameters= --let $restart_parameters=--innodb-force_recovery=0
--source include/start_mysqld.inc --source include/start_mysqld.inc
SET GLOBAL innodb_fast_shutdown=0; SET GLOBAL innodb_fast_shutdown=0;
--source include/restart_mysqld.inc --source include/restart_mysqld.inc
......
...@@ -2698,7 +2698,7 @@ buf_page_get_low( ...@@ -2698,7 +2698,7 @@ buf_page_get_low(
re_evict: re_evict:
if (mode != BUF_GET_IF_IN_POOL if (mode != BUF_GET_IF_IN_POOL
&& mode != BUF_GET_IF_IN_POOL_OR_WATCH) { && mode != BUF_GET_IF_IN_POOL_OR_WATCH) {
} else if (!ibuf_debug) { } else if (!ibuf_debug || recv_recovery_is_on()) {
} else if (fil_space_t* space = fil_space_t::get(page_id.space())) { } else if (fil_space_t* space = fil_space_t::get(page_id.space())) {
/* Try to evict the block from the buffer pool, to use the /* Try to evict the block from the buffer pool, to use the
insert buffer (change buffer) as much as possible. */ insert buffer (change buffer) as much as possible. */
......
This diff is collapsed.
...@@ -1204,8 +1204,9 @@ ATTRIBUTE_COLD void logs_empty_and_mark_files_at_shutdown() ...@@ -1204,8 +1204,9 @@ ATTRIBUTE_COLD void logs_empty_and_mark_files_at_shutdown()
if (srv_fast_shutdown == 2 || !srv_was_started) { if (srv_fast_shutdown == 2 || !srv_was_started) {
if (!srv_read_only_mode && srv_was_started) { if (!srv_read_only_mode && srv_was_started) {
ib::info() << "Executing innodb_fast_shutdown=2." sql_print_information(
" Next startup will execute crash recovery!"; "InnoDB: Executing innodb_fast_shutdown=2."
" Next startup will execute crash recovery!");
/* In this fastest shutdown we do not flush the /* In this fastest shutdown we do not flush the
buffer pool: buffer pool:
......
...@@ -1343,35 +1343,22 @@ static void fil_name_process(const char *name, ulint len, uint32_t space_id, ...@@ -1343,35 +1343,22 @@ static void fil_name_process(const char *name, ulint len, uint32_t space_id,
case FIL_LOAD_INVALID: case FIL_LOAD_INVALID:
ut_ad(space == NULL); ut_ad(space == NULL);
if (srv_force_recovery == 0) { if (srv_force_recovery == 0) {
ib::warn() << "We do not continue the crash" sql_print_error("InnoDB: Recovery cannot access"
" recovery, because the table may" " file %s (tablespace "
" become corrupt if we cannot apply" UINT32PF ")", name, space_id);
" the log records in the InnoDB log to" sql_print_information("InnoDB: You may set "
" it. To fix the problem and start" "innodb_force_recovery=1"
" mysqld:"; " to ignore this and"
ib::info() << "1) If there is a permission" " possibly get a"
" problem in the file and mysqld" " corrupted database.");
" cannot open the file, you should"
" modify the permissions.";
ib::info() << "2) If the tablespace is not"
" needed, or you can restore an older"
" version from a backup, then you can"
" remove the .ibd file, and use"
" --innodb_force_recovery=1 to force"
" startup without this file.";
ib::info() << "3) If the file system or the"
" disk is broken, and you cannot"
" remove the .ibd file, you can set"
" --innodb_force_recovery.";
recv_sys.set_corrupt_fs(); recv_sys.set_corrupt_fs();
break; break;
} }
ib::info() << "innodb_force_recovery was set to " sql_print_warning("InnoDB: Ignoring changes to"
<< srv_force_recovery << ". Continuing crash" " file %s (tablespace " UINT32PF ")"
" recovery even though we cannot access the" " due to innodb_force_recovery",
" files for tablespace " << space_id << "."; name, space_id);
break;
} }
} }
} }
......
...@@ -704,7 +704,7 @@ row_mysql_handle_errors( ...@@ -704,7 +704,7 @@ row_mysql_handle_errors(
" table. You have to dump + drop + reimport the" " table. You have to dump + drop + reimport the"
" table or, in a case of widespread corruption," " table or, in a case of widespread corruption,"
" dump all InnoDB tables and recreate the whole" " dump all InnoDB tables and recreate the whole"
" tablespace. If the mysqld server crashes after" " tablespace. If the mariadbd server crashes after"
" the startup or when you dump the tables. " " the startup or when you dump the tables. "
<< FORCE_RECOVERY_MSG; << FORCE_RECOVERY_MSG;
goto rollback_to_savept; goto rollback_to_savept;
......
...@@ -1556,6 +1556,10 @@ void srv_shutdown(bool ibuf_merge) ...@@ -1556,6 +1556,10 @@ void srv_shutdown(bool ibuf_merge)
if (ibuf_merge) { if (ibuf_merge) {
srv_main_thread_op_info = "doing insert buffer merge"; srv_main_thread_op_info = "doing insert buffer merge";
/* Disallow the use of change buffer to
avoid a race condition with
ibuf_read_merge_pages() */
ibuf_max_size_update(0);
log_free_check(); log_free_check();
n_read = ibuf_contract(); n_read = ibuf_contract();
srv_shutdown_print(now, n_read); srv_shutdown_print(now, n_read);
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2018, MariaDB Corporation. Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
......
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