diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-09-07 14:23:05 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-09-10 15:26:43 +0530 |
commit | f19da4a05a14e217e77600cd452a345d209101cf (patch) | |
tree | e7879168afb324a4c9bc6251910b8675d3a22064 /storage/innobase/dict | |
parent | 1bb3ad6dfc885112d05d8d73b066f18a416ca965 (diff) | |
download | mariadb-git-f19da4a05a14e217e77600cd452a345d209101cf.tar.gz |
MDEV-23199 page_compression flag is missing for full_crc32 tablespace
Problem:
======
Making the tablespace as page_compressed doesn't do table rebuild.
It does change only the FSP_SPACE_FLAGS.
During recovery:
1) InnoDB encounters FILE_CREATE redo log and opens the tablespace
with old FSP_SPACE_FLAGS value.
2) Only parsing of redo log has been finished. Now InnoDB tries to
load the table. If the existing tablespace flags doesn't match
with table flags then InnoDB should read page0. But in
fsp_flags_try_adjust(), skips the page read for full_crc32 format.
3) After that, InnoDB tries to open the clustered index and it
leads to failure of page validation.
Fix:
===
While parsing the redo log record, track FSP_SPACE_FLAGS in
recv_spaces for the respective space id. Assign the flags for
the tablespace when it is loaded.
recv_parse_set_size_and_flags(): Parse the redo log to set the
tablespace recovery size and flags.
fil_space_set_recv_size_and_flags(): Changed from
fil_space_set_recv_size(). To set the recovery size and flags of
the tablespace.
Introduce flags variable in file_name_t to maintain the tablespace
flag which we encountered during parsing of redo log.
is_flags_full_crc32_equal(), is_flags_non_full_crc32_equal(): Rename
the variable page_ssize and space_page_ssize with fcrc32_psize and
non_fcrc32_psize.
Diffstat (limited to 'storage/innobase/dict')
-rw-r--r-- | storage/innobase/dict/dict0load.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index 8094e4d9c08..41abe2d0a48 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -2710,8 +2710,9 @@ dict_get_and_save_data_dir_path( if (table->data_dir_path == NULL) { /* Since we did not set the table data_dir_path, unset the flag. This does not change SYS_DATAFILES - or SYS_TABLES or FSP_FLAGS on the header page of the - tablespace, but it makes dict_table_t consistent. */ + or SYS_TABLES or FSP_SPACE_FLAGS on the header page + of the tablespace, but it makes dict_table_t + consistent. */ table->flags &= ~DICT_TF_MASK_DATA_DIR; } |