summaryrefslogtreecommitdiff
path: root/storage/innobase/include/mtr0mtr.ic
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-10-27 17:56:49 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-10-27 18:30:00 +0530
commitbc540b8706a404c8aec81a599c7e7ec1a46b5ad1 (patch)
tree4d4d2db154c96cbf5aa928294456cc0d88011817 /storage/innobase/include/mtr0mtr.ic
parent6a614d6934a85e8228957fe1d7242928a00dc5ff (diff)
downloadmariadb-git-bc540b8706a404c8aec81a599c7e7ec1a46b5ad1.tar.gz
MDEV-23693 Failing assertion: my_atomic_load32_explicit(&lock->lock_word, MY_MEMORY_ORDER_RELAXED) == X_LOCK_DECR
InnoDB frees the block lock during buffer pool shrinking when other thread is yet to release the block lock. While shrinking the buffer pool, InnoDB allows the page to be freed unless it is buffer fixed. In some cases, InnoDB releases the latch after unfixing the block. Fix: ==== - InnoDB should unfix the block after releases the latch. - Add more assertion to check buffer fix while accessing the page. - Introduced block_hint structure to store buf_block_t pointer and allow accessing the buf_block_t pointer only by passing a functor. It returns original buf_block_t* pointer if it is valid or nullptr if the pointer become stale. - Replace buf_block_is_uncompressed() with buf_pool_t::is_block_pointer() This change is motivated by a change in mysql-5.7.32: mysql/mysql-server@46e60de444a8fbd876cc6778a7e64a1d3426a48d Bug #31036301 ASSERTION FAILURE: SYNC0RW.IC:429:LOCK->LOCK_WORD
Diffstat (limited to 'storage/innobase/include/mtr0mtr.ic')
-rw-r--r--storage/innobase/include/mtr0mtr.ic4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/include/mtr0mtr.ic b/storage/innobase/include/mtr0mtr.ic
index 8d68affb1cb..a45d088d5d7 100644
--- a/storage/innobase/include/mtr0mtr.ic
+++ b/storage/innobase/include/mtr0mtr.ic
@@ -170,10 +170,10 @@ mtr_t::release_block_at_savepoint(
ut_a(slot->object == block);
- buf_block_unfix(reinterpret_cast<buf_block_t*>(block));
-
buf_page_release_latch(block, slot->type);
+ buf_block_unfix(reinterpret_cast<buf_block_t*>(block));
+
slot->object = NULL;
}