Commit b1874147 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.6 into 10.11

parents e3f653ca a74bea7b
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test/t[12]\\.ibd' page \\[page id: space=[1-9][0-9]*, page number=3\\]");
call mtr.add_suppression("InnoDB: File '.*test/t[12]\\.ibd' is corrupted");
call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted");
# Restart mysqld --file-key-management-filename=keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
......
......@@ -6,7 +6,9 @@
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test/t[12]\\.ibd' page \\[page id: space=[1-9][0-9]*, page number=3\\]");
call mtr.add_suppression("InnoDB: File '.*test/t[12]\\.ibd' is corrupted");
call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted");
--echo # Restart mysqld --file-key-management-filename=keys2.txt
......
......@@ -2906,7 +2906,10 @@ buf_block_t *buf_pool_t::page_fix(const page_id_t id,
return reinterpret_cast<buf_block_t*>(-1);
}
if (UNIV_UNLIKELY(!b->frame))
if (UNIV_LIKELY(b->frame != nullptr));
else if (state < buf_page_t::READ_FIX)
goto unzip;
else
{
wait_for_unzip:
b->unfix();
......@@ -2927,6 +2930,7 @@ buf_block_t *buf_pool_t::page_fix(const page_id_t id,
if (UNIV_UNLIKELY(!b->frame))
{
unzip:
if (b->lock.x_lock_try());
else if (c == FIX_NOWAIT)
goto would_block;
......@@ -4064,7 +4068,7 @@ dberr_t buf_page_t::read_complete(const fil_node_t &node)
if (recovery && !recv_recover_page(node.space, this))
return DB_PAGE_CORRUPTED;
const bool ibuf_may_exist= frame && !recv_no_ibuf_operations &&
const bool ibuf_may_exist= !recv_no_ibuf_operations &&
(!expected_id.space() || !is_predefined_tablespace(expected_id.space())) &&
fil_page_get_type(read_frame) == FIL_PAGE_INDEX &&
page_is_leaf(read_frame);
......
......@@ -449,30 +449,22 @@ ulint buf_read_ahead_random(const page_id_t page_id, bool ibuf)
return count;
}
/** High-level function which reads a page from a file to buf_pool
if it is not already there. Sets the io_fix and an exclusive lock
on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread.
@param[in] page_id page id
@retval DB_SUCCESS if the page was read and is not corrupted
@retval DB_SUCCESS_LOCKED_REC if the page was not read
@retval DB_PAGE_CORRUPTED if page based on checksum check is corrupted
@retval DB_DECRYPTION_FAILED if page post encryption checksum matches but
after decryption normal page checksum does not match.
@retval DB_TABLESPACE_DELETED if tablespace .ibd file is missing */
dberr_t buf_read_page(const page_id_t page_id)
{
fil_space_t *space= fil_space_t::get(page_id.space());
if (!space)
if (UNIV_UNLIKELY(!space))
{
ib::info() << "trying to read page " << page_id
<< " in nonexisting or being-dropped tablespace";
sql_print_information("InnoDB: trying to read page "
"[page id: space=" UINT32PF
", page number=" UINT32PF "]"
" in nonexisting or being-dropped tablespace",
page_id.space(), page_id.page_no());
return DB_TABLESPACE_DELETED;
}
buf_LRU_stat_inc_io(); /* NOT protected by buf_pool.mutex */
return buf_read_page_low(space, true, BUF_READ_ANY_PAGE,
page_id, space->zip_size(), false);
page_id, space->zip_size(), true);
}
/** High-level function which reads a page asynchronously from a file to the
......
......@@ -29,10 +29,8 @@ Created 11/5/1995 Heikki Tuuri
#include "buf0buf.h"
/** High-level function which reads a page asynchronously from a file to the
buffer buf_pool if it is not already there. Sets the io_fix flag and sets
an exclusive lock on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread.
/** Read a page synchronously from a file. buf_page_t::read_complete()
will be invoked on read completion.
@param page_id page id
@retval DB_SUCCESS if the page was read and is not corrupted
@retval DB_SUCCESS_LOCKED_REC if the page was not read
......
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