Commit 539a165b authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-12026: Fix type mismatch

Revert the type casts of 58e525e4.
parent 58e525e4
...@@ -282,7 +282,7 @@ static void init_page_size(const byte* buf) ...@@ -282,7 +282,7 @@ static void init_page_size(const byte* buf)
+ FSP_SPACE_FLAGS); + FSP_SPACE_FLAGS);
if (FSP_FLAGS_FCRC32_HAS_MARKER(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; physical_page_size = srv_page_size;
return; return;
} }
...@@ -293,7 +293,7 @@ static void init_page_size(const byte* buf) ...@@ -293,7 +293,7 @@ static void init_page_size(const byte* buf)
? UNIV_ZIP_SIZE_SHIFT_MIN - 1 + ssize ? UNIV_ZIP_SIZE_SHIFT_MIN - 1 + ssize
: UNIV_PAGE_SIZE_SHIFT_ORIG; : 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); physical_page_size = fil_space_t::physical_size(flags);
} }
......
...@@ -272,7 +272,7 @@ struct fil_space_t { ...@@ -272,7 +272,7 @@ struct fil_space_t {
@param flags tablespace flags (FSP_FLAGS) @param flags tablespace flags (FSP_FLAGS)
@return the logical page size @return the logical page size
@retval 0 if the flags are invalid */ @retval 0 if the flags are invalid */
static ulint logical_size(ulint flags) { static unsigned logical_size(ulint flags) {
ulint page_ssize = 0; ulint page_ssize = 0;
...@@ -298,7 +298,7 @@ struct fil_space_t { ...@@ -298,7 +298,7 @@ struct fil_space_t {
@param flags tablespace flags (FSP_FLAGS) @param flags tablespace flags (FSP_FLAGS)
@return the ROW_FORMAT=COMPRESSED page size @return the ROW_FORMAT=COMPRESSED page size
@retval 0 if ROW_FORMAT=COMPRESSED is not used */ @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)) { if (full_crc32(flags)) {
return 0; return 0;
...@@ -311,7 +311,7 @@ struct fil_space_t { ...@@ -311,7 +311,7 @@ struct fil_space_t {
/** Determine the physical page size. /** Determine the physical page size.
@param flags tablespace flags (FSP_FLAGS) @param flags tablespace flags (FSP_FLAGS)
@return the physical page size */ @return the physical page size */
static ulint physical_size(ulint flags) { static unsigned physical_size(ulint flags) {
if (full_crc32(flags)) { if (full_crc32(flags)) {
return logical_size(flags); return logical_size(flags);
...@@ -320,13 +320,13 @@ struct fil_space_t { ...@@ -320,13 +320,13 @@ struct fil_space_t {
ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(flags); ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(flags);
return zip_ssize return zip_ssize
? (UNIV_ZIP_SIZE_MIN >> 1) << zip_ssize ? (UNIV_ZIP_SIZE_MIN >> 1) << zip_ssize
: srv_page_size; : unsigned(srv_page_size);
} }
/** @return the ROW_FORMAT=COMPRESSED page size /** @return the ROW_FORMAT=COMPRESSED page size
@retval 0 if ROW_FORMAT=COMPRESSED is not used */ @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 */ /** @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. /** Check whether the compression enabled in tablespace.
@param[in] flags tablespace flags */ @param[in] flags tablespace flags */
static bool is_compressed(ulint flags) { static bool is_compressed(ulint flags) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment