MDEV-23254 Replace FSP_FLAGS_HAS_PAGE_COMPRESSION with fil_space_t::is_compressed

InnoDB should replace FSP_FLAGS_HAS_PAGE_COMPRESSION check with
fil_space_t::is_compressed(). fil_space_t::is_compressed() checks
for both non full crc32 and crc32 format.
parent 8c7f7bae
...@@ -817,7 +817,7 @@ fil_space_extend_must_retry( ...@@ -817,7 +817,7 @@ fil_space_extend_must_retry(
os_offset_t(FIL_IBD_FILE_INITIAL_SIZE << srv_page_size_shift)); os_offset_t(FIL_IBD_FILE_INITIAL_SIZE << srv_page_size_shift));
*success = os_file_set_size(node->name, node->handle, new_size, *success = os_file_set_size(node->name, node->handle, new_size,
FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags)); space->is_compressed());
os_has_said_disk_full = *success; os_has_said_disk_full = *success;
if (*success) { if (*success) {
...@@ -2910,7 +2910,7 @@ fil_ibd_create( ...@@ -2910,7 +2910,7 @@ fil_ibd_create(
return NULL; return NULL;
} }
const bool is_compressed = FSP_FLAGS_HAS_PAGE_COMPRESSION(flags); const bool is_compressed = fil_space_t::is_compressed(flags);
bool punch_hole = is_compressed; bool punch_hole = is_compressed;
#ifdef _WIN32 #ifdef _WIN32
...@@ -3740,7 +3740,7 @@ fil_ibd_load( ...@@ -3740,7 +3740,7 @@ fil_ibd_load(
/* Adjust the memory-based flags that would normally be set by /* Adjust the memory-based flags that would normally be set by
dict_tf_to_fsp_flags(). In recovery, we have no data dictionary. */ dict_tf_to_fsp_flags(). In recovery, we have no data dictionary. */
ulint flags = file.flags(); ulint flags = file.flags();
if (FSP_FLAGS_HAS_PAGE_COMPRESSION(flags)) { if (fil_space_t::is_compressed(flags)) {
flags |= page_zip_level flags |= page_zip_level
<< FSP_FLAGS_MEM_COMPRESSION_LEVEL; << FSP_FLAGS_MEM_COMPRESSION_LEVEL;
} }
......
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