diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index e56e214134214..09f275a9dbfca 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -2914,11 +2914,15 @@ lock_move_reorganize_page( UT_LIST_INIT(old_locks, &lock_t::trx_locks); const page_id_t id{block->page.id()}; + /* Fast path for the early exit case, available only with lock elision. */ +#if !defined NO_ELISION && !defined SUX_LOCK_GENERIC + if (have_transactional_memory) { TMLockGuard g{lock_sys.rec_hash, id}; if (!lock_sys_t::get_first(g.cell(), id)) return; } +#endif /* All record locks affected by a page reorganize belong to this single page and therefore live in a single lock_sys.rec_hash cell.