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

MDEV-23566 SIGSEGV in mtr_t::init

mtr_t::init(): Correct the debug assertion that was added in
commit c8936686 (MDEV-22970).
When the original failure scenario involves the system tablespace,
we could have m_user_space==nullptr. Let us compare m_user_space_id
instead.
parent 65ee216c
...@@ -513,7 +513,8 @@ inline void mtr_t::init(buf_block_t *b) ...@@ -513,7 +513,8 @@ inline void mtr_t::init(buf_block_t *b)
{ {
if (UNIV_LIKELY_NULL(m_freed_pages)) if (UNIV_LIKELY_NULL(m_freed_pages))
{ {
ut_ad(m_user_space->id == b->page.id().space()); ut_ad(m_log_mode != MTR_LOG_ALL ||
m_user_space_id == b->page.id().space());
if (m_freed_pages->remove_if_exists(b->page.id().page_no()) && if (m_freed_pages->remove_if_exists(b->page.id().page_no()) &&
m_freed_pages->empty()) m_freed_pages->empty())
{ {
......
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