diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-02-10 14:15:51 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-02-10 14:15:51 +0200 |
commit | bfb4761ca04704d68dba51f76d7c9967f880a6ee (patch) | |
tree | 9ebca2649bb5d8bad0e6db7dd34980061d51ae13 | |
parent | a2fbbba2e3f2ee291163d74f3f4246e259a5cffe (diff) | |
download | mariadb-git-bfb4761ca04704d68dba51f76d7c9967f880a6ee.tar.gz |
MDEV-24834 Assertion mtr->memo_contains_flagged() in btr0cur.cc:1500
A too strict debug assertion was introduced in
commit 03ca6495df31313c96e38834b9a235245e2ae2a8 (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.
-rw-r--r-- | storage/innobase/btr/btr0cur.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index e327a363834..42079a6c90f 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -1498,7 +1498,8 @@ x_latch_index: if (!srv_read_only_mode) { if (s_latch_by_caller) { 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) { /* BTR_SEARCH_TREE is intended to be used with BTR_ALREADY_S_LATCHED */ |