summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-11-17 15:07:37 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-11-18 13:52:37 +0200
commitce0cb6a4f660a2bb4d1cf666f73f62977d03a4e2 (patch)
tree011f206618024843f4e609d60d5734ab2e97eb27
parent6628435e94f11116909163f1e135f86a64f2b6cb (diff)
downloadmariadb-git-ce0cb6a4f660a2bb4d1cf666f73f62977d03a4e2.tar.gz
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.
-rw-r--r--storage/innobase/mtr/mtr0mtr.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc
index f966d4c74c6..fefc0687ddb 100644
--- a/storage/innobase/mtr/mtr0mtr.cc
+++ b/storage/innobase/mtr/mtr0mtr.cc
@@ -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 &block;
@@ -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;
}
};