Skip to content
Permalink
Browse files
MDEV-21174 fixup: Remove mtr_t::release_page()
mtr_t::release_page(): Remove. The function became unused in
commit 56f6dab
when the call was replaced with a call to mtr_t::memo_release().
  • Loading branch information
dr-m committed Nov 10, 2022
1 parent 7aa8b20 commit 7ee612c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
@@ -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. */
@@ -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<FindPage> 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;

0 comments on commit 7ee612c

Please sign in to comment.