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.)
This commit is contained in:
Marko Mäkelä 2017-10-09 14:08:46 +03:00
parent da05d0276a
commit 3edd007cea

View file

@ -1041,7 +1041,8 @@ btr_free_root(
{
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()));
btr_search_drop_page_hash_index(block);