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

MDEV-24188 fixup: Correct the FindBlockX predicate

FindBlockX::operator(): Return false if an x-latched block is found.
Previously, we were incorrectly returning false if the block was in
the log, only if not x-latched.

It is unknown if this mistake had any visible impact. Often,
we would register both MTR_MEMO_BUF_FIX and MTR_MEMO_PAGE_X_FIX
for the same block.
parent 6628435e
......@@ -804,7 +804,7 @@ mtr_t::release_free_extents(ulint n_reserved)
space->release_free_extents(n_reserved);
}
/** Find out whether a block was X-latched by the mini-transaction */
/** Find out whether a block was not X-latched by the mini-transaction */
struct FindBlockX
{
const buf_block_t █
......@@ -814,7 +814,7 @@ struct FindBlockX
/** @return whether the block was not found x-latched */
bool operator()(const mtr_memo_slot_t *slot) const
{
return slot->object != &block || slot->type == MTR_MEMO_PAGE_X_FIX;
return slot->object != &block || slot->type != MTR_MEMO_PAGE_X_FIX;
}
};
......
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