Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2b660fb4
Commit
2b660fb4
authored
Jun 16, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtr_t::is_block_dirtied(): Define inline
parent
a94638f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
storage/innobase/include/mtr0mtr.h
storage/innobase/include/mtr0mtr.h
+1
-1
storage/innobase/include/mtr0mtr.ic
storage/innobase/include/mtr0mtr.ic
+15
-1
storage/innobase/mtr/mtr0mtr.cc
storage/innobase/mtr/mtr0mtr.cc
+0
-14
No files found.
storage/innobase/include/mtr0mtr.h
View file @
2b660fb4
...
...
@@ -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:
...
...
storage/innobase/include/mtr0mtr.ic
View file @
2b660fb4
/*****************************************************************************
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
...
...
storage/innobase/mtr/mtr0mtr.cc
View file @
2b660fb4
...
...
@@ -457,20 +457,6 @@ class mtr_t::Command {
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment