Lines 942-952
fil_space_extend_must_retry(
Link Here
|
942 |
const page_size_t pageSize(space->flags); |
942 |
const page_size_t pageSize(space->flags); |
943 |
const ulint page_size = pageSize.physical(); |
943 |
const ulint page_size = pageSize.physical(); |
944 |
|
944 |
|
945 |
/* fil_read_first_page() expects srv_page_size bytes. |
945 |
/* fil_read_first_page() expects innodb_page_size bytes. |
946 |
fil_node_open_file() expects at least 4 * srv_page_size bytes.*/ |
946 |
fil_node_open_file() expects at least 4 * innodb_page_size bytes. |
947 |
os_offset_t new_size = std::max( |
947 |
os_file_set_size() expects multiples of 4096 bytes. |
948 |
os_offset_t(size - file_start_page_no) * page_size, |
948 |
For ROW_FORMAT=COMPRESSED tables using 1024-byte or 2048-byte |
|
|
949 |
pages, we will preallocate up to an integer multiple of 4096 bytes, |
950 |
and let normal writes append 1024, 2048, or 3072 bytes to the file. */ |
951 |
os_offset_t new_size = std::max( |
952 |
(os_offset_t(size - file_start_page_no) * page_size) |
953 |
& ~os_offset_t(4095), |
949 |
os_offset_t(FIL_IBD_FILE_INITIAL_SIZE << srv_page_size_shift)); |
954 |
os_offset_t(FIL_IBD_FILE_INITIAL_SIZE << srv_page_size_shift)); |
|
|
955 |
|
950 |
|
956 |
|
951 |
*success = os_file_set_size(node->name, node->handle, new_size, |
957 |
*success = os_file_set_size(node->name, node->handle, new_size, |
952 |
FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags)); |
958 |
FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags)); |