diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-05-07 17:15:34 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-05-07 17:15:34 +0300 |
commit | 18a62eb76df0cc0bece66ba29c354c613f58e944 (patch) | |
tree | 7bd7c36be88a9cc5a1f5181938de58f8b775575b /extra/innochecksum.cc | |
parent | ba573c4736f908a6525acddb7573cc7d818eaa25 (diff) | |
download | mariadb-git-18a62eb76df0cc0bece66ba29c354c613f58e944.tar.gz |
MDEV-21133 follow-up: Use fil_page_get_type()
Let us use the common accessor function fil_page_get_type()
instead of accessing the page header field FIL_PAGE_TYPE directly.
Diffstat (limited to 'extra/innochecksum.cc')
-rw-r--r-- | extra/innochecksum.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index 81deba4c390..d8d043d89b9 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -467,7 +467,7 @@ is_page_corrupted( /* use to store LSN values. */ ulint logseq; ulint logseqfield; - ulint page_type = mach_read_from_2(buf+FIL_PAGE_TYPE); + const uint16_t page_type = fil_page_get_type(buf); uint key_version = buf_page_get_key_version(buf, flags); ulint space_id = mach_read_from_4( buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); @@ -835,7 +835,7 @@ parse_page( strcpy(str, "-"); } - switch (mach_read_from_2(page + FIL_PAGE_TYPE)) { + switch (fil_page_get_type(page)) { case FIL_PAGE_INDEX: { uint key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); @@ -1933,7 +1933,7 @@ first_non_zero: skip_page = false; } - ulint cur_page_type = mach_read_from_2(buf+FIL_PAGE_TYPE); + const uint16_t cur_page_type = fil_page_get_type(buf); /* FIXME: Page compressed or Page compressed and encrypted pages do not contain checksum. */ |