Commit 3edd007c authored by Marko Mäkelä's avatar Marko Mäkelä

btr_free_root(): Relax a too strict debug assertion

When btr_create() invokes btr_free_root() after running out of space,
fseg_create() would have acquired an SX-latch on the root page, not
an X-latch. Relax the debug assertion in btr_free_root() accordingly.

(In this case, SX-latch and X-latch are equivalent. During the CREATE
operation there should be MDL_EXCLUSIVE and dict_operation_lock X-latch
preventing concurrent access to the index. Normally the purpose of the
SX-latch is to allow concurrent reads of the root page while certain
fields in the root page are updated in place.)
parent da05d027
...@@ -1041,7 +1041,8 @@ btr_free_root( ...@@ -1041,7 +1041,8 @@ btr_free_root(
{ {
fseg_header_t* header; fseg_header_t* header;
ut_ad(mtr_memo_contains_flagged(mtr, block, MTR_MEMO_PAGE_X_FIX)); ut_ad(mtr_memo_contains_flagged(mtr, block, MTR_MEMO_PAGE_X_FIX
| MTR_MEMO_PAGE_SX_FIX));
ut_ad(mtr->is_named_space(block->page.id.space())); ut_ad(mtr->is_named_space(block->page.id.space()));
btr_search_drop_page_hash_index(block); btr_search_drop_page_hash_index(block);
......
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