mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
MDEV-30524 btr_cur_t::open_leaf() opens non-leaf page in BTR_MODIFY_LEAF mode
btr_cur_t::open_leaf(): When we have to reopen the root page in
a different mode, ensure that we will actually acquire a latch upfront,
instead of using RW_NO_LATCH. This prevents a race condition where
the index tree would be split between the time we released the
root page S latch and finally acquired a latch in
mtr->upgrade_buffer_fix(), actually on a non-leaf root page.
This race condition was introduced in
commit 89ec4b53ac
(MDEV-29603).
This commit is contained in:
parent
c3a5cf2b5b
commit
ccafd2d49d
1 changed files with 1 additions and 0 deletions
|
@ -1890,6 +1890,7 @@ dberr_t btr_cur_t::open_leaf(bool first, dict_index_t *index,
|
|||
ut_ad(root_leaf_rw_latch != RW_NO_LATCH);
|
||||
upper_rw_latch= root_leaf_rw_latch;
|
||||
mtr->rollback_to_savepoint(savepoint);
|
||||
height= ULINT_UNDEFINED;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue