Commit 9dfe84d5 authored by Marko Mäkelä's avatar Marko Mäkelä

Remove a bogus page_is_root() debug assertion on btr_create() failure

The predicate page_is_root() would not hold if btr_create() fails
before the root page is fully initialized. Move the debug assertion
from btr_free_root_invalidate() to its other caller,
btr_free_if_exists(). In that caller, we actually already checked
for page_is_root().
parent 5f5ffdc7
......@@ -1133,8 +1133,6 @@ btr_free_root_invalidate(
buf_block_t* block,
mtr_t* mtr)
{
ut_ad(page_is_root(block->frame));
btr_page_set_index_id(
buf_block_get_frame(block),
buf_block_get_page_zip(block),
......@@ -1435,6 +1433,7 @@ btr_free_if_exists(
return;
}
ut_ad(page_is_root(root->frame));
btr_free_but_not_root(root, mtr->get_log_mode());
mtr->set_named_space(page_id.space());
btr_free_root(root, mtr);
......
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