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

MDEV-24834 Assertion mtr->memo_contains_flagged() in btr0cur.cc:1500

A too strict debug assertion was introduced in
commit 03ca6495 (MDEV-24142).
It turns out that row_ins_sec_index_entry_low() may acquire a stronger
latch on the index. The old rw_lock_own(..., RW_LOCK_S) assertion
would hold also for the SX (Update) latch mode.

btr_cur_search_to_nth_level_func(): Relax the assertion to require
that the mini-transaction hold any of S or U latch.
parent a2fbbba2
...@@ -1498,7 +1498,8 @@ btr_cur_search_to_nth_level_func( ...@@ -1498,7 +1498,8 @@ btr_cur_search_to_nth_level_func(
if (!srv_read_only_mode) { if (!srv_read_only_mode) {
if (s_latch_by_caller) { if (s_latch_by_caller) {
ut_ad(mtr->memo_contains_flagged( ut_ad(mtr->memo_contains_flagged(
&index->lock, MTR_MEMO_S_LOCK)); &index->lock, MTR_MEMO_S_LOCK
| MTR_MEMO_SX_LOCK));
} else if (!modify_external) { } else if (!modify_external) {
/* BTR_SEARCH_TREE is intended to be used with /* BTR_SEARCH_TREE is intended to be used with
BTR_ALREADY_S_LATCHED */ BTR_ALREADY_S_LATCHED */
......
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