summaryrefslogtreecommitdiff
path: root/storage/innobase/handler
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-11-08 06:28:29 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-11-08 09:44:08 +0200
commit5d596064d676ae691d55cae653b1c461ab012e46 (patch)
tree7bcce75844a128ed401bf1a6c36ec7ad9ded05d9 /storage/innobase/handler
parent52246dff2c76b0ba79993276c5853aae51ecb9b7 (diff)
downloadmariadb-git-5d596064d676ae691d55cae653b1c461ab012e46.tar.gz
Cleanup: Define FIL_PAGE_TYPE constants as constexpr
Diffstat (limited to 'storage/innobase/handler')
-rw-r--r--storage/innobase/handler/i_s.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
index 0b7e117e04b..9c809488a13 100644
--- a/storage/innobase/handler/i_s.cc
+++ b/storage/innobase/handler/i_s.cc
@@ -4164,9 +4164,10 @@ i_s_innodb_set_page_type(
/*=====================*/
buf_page_info_t*page_info, /*!< in/out: structure to fill with
scanned info */
- ulint page_type, /*!< in: page type */
const byte* frame) /*!< in: buffer frame */
{
+ uint16_t page_type = fil_page_get_type(frame);
+
if (fil_page_type_is_index(page_type)) {
const page_t* page = (const page_t*) frame;
@@ -4245,7 +4246,6 @@ i_s_innodb_buffer_page_get_info(
BUF_BLOCK_ZIP_DIRTY or BUF_BLOCK_FILE_PAGE */
if (buf_page_in_file(bpage)) {
const byte* frame;
- ulint page_type;
page_info->space_id = bpage->id.space();
@@ -4296,9 +4296,7 @@ i_s_innodb_buffer_page_get_info(
frame = bpage->zip.data;
}
- page_type = fil_page_get_type(frame);
-
- i_s_innodb_set_page_type(page_info, page_type, frame);
+ i_s_innodb_set_page_type(page_info, frame);
} else {
page_info->page_type = I_S_PAGE_TYPE_UNKNOWN;
}