From 7ee612c912eb3b9ebf8ce3ec8b2157144cfe804b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 10 Nov 2022 12:50:44 +0200 Subject: [PATCH] MDEV-21174 fixup: Remove mtr_t::release_page() mtr_t::release_page(): Remove. The function became unused in commit 56f6dab1d0e5a464ea49c1e5efb0032a0f5cea3e when the call was replaced with a call to mtr_t::memo_release(). --- storage/innobase/include/mtr0mtr.h | 4 ---- storage/innobase/mtr/mtr0mtr.cc | 23 ----------------------- 2 files changed, 27 deletions(-) diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index 903b3f4699f..b64dccb887f 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -282,10 +282,6 @@ struct mtr_t { @param type object type @return bool if lock released */ bool memo_release(const void* object, ulint type); - /** Release a page latch. - @param[in] ptr pointer to within a page frame - @param[in] type object type: MTR_MEMO_PAGE_X_FIX, ... */ - void release_page(const void* ptr, mtr_memo_type_t type); private: /** Note that the mini-transaction will modify data. */ diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index f13b677742b..651bda06145 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -757,29 +757,6 @@ mtr_t::memo_release(const void* object, ulint type) return(false); } -/** Release a page latch. -@param[in] ptr pointer to within a page frame -@param[in] type object type: MTR_MEMO_PAGE_X_FIX, ... */ -void -mtr_t::release_page(const void* ptr, mtr_memo_type_t type) -{ - ut_ad(is_active()); - - /* We cannot release a page that has been written to in the - middle of a mini-transaction. */ - ut_ad(!m_modifications || type != MTR_MEMO_PAGE_X_FIX); - - Iterate iteration(FindPage(ptr, type)); - - if (!m_memo.for_each_block_in_reverse(iteration)) { - memo_slot_release(iteration.functor.get_slot()); - return; - } - - /* The page was not found! */ - ut_ad(0); -} - static bool log_margin_warned; static time_t log_margin_warn_time; static bool log_close_warned;