From 539a165b7a470baad1f3fcda7dde1ed6a81b1c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 20 Feb 2019 09:07:13 +0200 Subject: [PATCH] MDEV-12026: Fix type mismatch Revert the type casts of 58e525e4f3f65f77321b7978cc3b5df8363e0ebf. --- extra/innochecksum.cc | 4 ++-- storage/innobase/include/fil0fil.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index 2636d0093c6..55d41fc04ad 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -282,7 +282,7 @@ static void init_page_size(const byte* buf) + FSP_SPACE_FLAGS); if (FSP_FLAGS_FCRC32_HAS_MARKER(flags)) { - srv_page_size = (ulong)fil_space_t::logical_size(flags); + srv_page_size = fil_space_t::logical_size(flags); physical_page_size = srv_page_size; return; } @@ -293,7 +293,7 @@ static void init_page_size(const byte* buf) ? UNIV_ZIP_SIZE_SHIFT_MIN - 1 + ssize : UNIV_PAGE_SIZE_SHIFT_ORIG; - srv_page_size = (ulong)fil_space_t::logical_size(flags); + srv_page_size = fil_space_t::logical_size(flags); physical_page_size = fil_space_t::physical_size(flags); } diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index ade807f34a6..c1531e21f61 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -272,7 +272,7 @@ struct fil_space_t { @param flags tablespace flags (FSP_FLAGS) @return the logical page size @retval 0 if the flags are invalid */ - static ulint logical_size(ulint flags) { + static unsigned logical_size(ulint flags) { ulint page_ssize = 0; @@ -298,7 +298,7 @@ struct fil_space_t { @param flags tablespace flags (FSP_FLAGS) @return the ROW_FORMAT=COMPRESSED page size @retval 0 if ROW_FORMAT=COMPRESSED is not used */ - static ulint zip_size(ulint flags) { + static unsigned zip_size(ulint flags) { if (full_crc32(flags)) { return 0; @@ -311,7 +311,7 @@ struct fil_space_t { /** Determine the physical page size. @param flags tablespace flags (FSP_FLAGS) @return the physical page size */ - static ulint physical_size(ulint flags) { + static unsigned physical_size(ulint flags) { if (full_crc32(flags)) { return logical_size(flags); @@ -320,13 +320,13 @@ struct fil_space_t { ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(flags); return zip_ssize ? (UNIV_ZIP_SIZE_MIN >> 1) << zip_ssize - : srv_page_size; + : unsigned(srv_page_size); } /** @return the ROW_FORMAT=COMPRESSED page size @retval 0 if ROW_FORMAT=COMPRESSED is not used */ - ulint zip_size() const { return zip_size(flags); } + unsigned zip_size() const { return zip_size(flags); } /** @return the physical page size */ - ulint physical_size() const { return physical_size(flags); } + unsigned physical_size() const { return physical_size(flags); } /** Check whether the compression enabled in tablespace. @param[in] flags tablespace flags */ static bool is_compressed(ulint flags) {