mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
mtr_t::is_block_dirtied(): Define inline
This commit is contained in:
parent
a94638f155
commit
2b660fb4c2
3 changed files with 16 additions and 16 deletions
|
@ -550,7 +550,7 @@ struct mtr_t {
|
|||
/** Check if this mini-transaction is dirtying a clean page.
|
||||
@param block block being x-fixed
|
||||
@return true if the mtr is dirtying a clean page. */
|
||||
static bool is_block_dirtied(const buf_block_t* block)
|
||||
static inline bool is_block_dirtied(const buf_block_t* block)
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
private:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
|
@ -26,6 +26,20 @@ Created 11/26/1995 Heikki Tuuri
|
|||
|
||||
#include "buf0buf.h"
|
||||
|
||||
/** Check if a mini-transaction is dirtying a clean page.
|
||||
@return true if the mtr is dirtying a clean page. */
|
||||
bool
|
||||
mtr_t::is_block_dirtied(const buf_block_t* block)
|
||||
{
|
||||
ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
|
||||
ut_ad(block->page.buf_fix_count > 0);
|
||||
|
||||
/* It is OK to read oldest_modification because no
|
||||
other thread can be performing a write of it and it
|
||||
is only during write that the value is reset to 0. */
|
||||
return(block->page.oldest_modification == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
Pushes an object to an mtr memo stack. */
|
||||
void
|
||||
|
|
|
@ -457,20 +457,6 @@ private:
|
|||
lsn_t m_end_lsn;
|
||||
};
|
||||
|
||||
/** Check if a mini-transaction is dirtying a clean page.
|
||||
@return true if the mtr is dirtying a clean page. */
|
||||
bool
|
||||
mtr_t::is_block_dirtied(const buf_block_t* block)
|
||||
{
|
||||
ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
|
||||
ut_ad(block->page.buf_fix_count > 0);
|
||||
|
||||
/* It is OK to read oldest_modification because no
|
||||
other thread can be performing a write of it and it
|
||||
is only during write that the value is reset to 0. */
|
||||
return(block->page.oldest_modification == 0);
|
||||
}
|
||||
|
||||
/** Write the block contents to the REDO log */
|
||||
struct mtr_write_log_t {
|
||||
/** Append a block to the redo log buffer.
|
||||
|
|
Loading…
Reference in a new issue