diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-07-17 19:56:33 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-07-20 18:52:10 +0530 |
commit | c89366866bca2df46b0592719a1f6b6dabf470cb (patch) | |
tree | 08a9b34a69673e63e3d3b7147dab760ede84e8d9 /storage/innobase/include/mtr0log.h | |
parent | 4d4865de6f124ed0a97573bf784102077f7296e7 (diff) | |
download | mariadb-git-c89366866bca2df46b0592719a1f6b6dabf470cb.tar.gz |
MDEV-22970 Possible corruption of page_compressed tables, or
when scrubbing is enabled
buf_read_recv_pages(): Ignore the page to read if it is already
present in the freed ranges.
store_freed_or_init_rec(): Store the ranges only if scrubbing
is enabled or page compressed tablespace.
recv_init_crash_recovery_space(): Add the freed range only when
scrubbing or page compressed tablespace.
range_set::contains(): Search the value is present in ranges.
range_set::remove_if_exists(): Remove the value if exist in ranges.
mtr_t::init(): Handles the scenario that mini-transaction may allocate
a page that had just been freed.
recv_sys_t::parse(): Note down the FREE and INIT redo log irrespective
of STORE value.
Removed innodb_tablespaces_scrubbing from test case
Diffstat (limited to 'storage/innobase/include/mtr0log.h')
-rw-r--r-- | storage/innobase/include/mtr0log.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/storage/innobase/include/mtr0log.h b/storage/innobase/include/mtr0log.h index 926411a6f97..ee611f6f2ee 100644 --- a/storage/innobase/include/mtr0log.h +++ b/storage/innobase/include/mtr0log.h @@ -511,7 +511,17 @@ inline void mtr_t::memcpy(const buf_block_t &b, void *dest, const void *str, @param[in,out] b buffer page */ inline void mtr_t::init(buf_block_t *b) { - ut_ad(!m_freed_pages); + if (UNIV_LIKELY_NULL(m_freed_pages)) + { + ut_ad(m_user_space->id == b->page.id().space()); + if (m_freed_pages->remove_if_exists(b->page.id().page_no()) && + m_freed_pages->empty()) + { + delete m_freed_pages; + m_freed_pages= nullptr; + } + } + b->page.status= buf_page_t::INIT_ON_FLUSH; if (m_log_mode != MTR_LOG_ALL) |