Commit 59d4f2a3 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup after MDEV-12026

buf_flush_init_for_writing(): If innodb_checksum_algorithm=full_crc32,
return even earlier.

The logic to reset garbage FIL_PAGE_TYPE fields applies to
data pages in old data files that were last written before
commit 3926673c was introduced.

When innodb_checksum_algorithm=full_crc32 is in effect, it only
applies to newly created data files. A file that was created in
full_crc32 format will keep that format. Other files will keep
some other format than full_crc32. Hence, the garbage-resetting
logic does not apply full_crc32 files.
parent ffc0a08d
......@@ -838,6 +838,7 @@ buf_flush_init_for_writing(
if (use_full_checksum) {
mach_write_to_4(page + srv_page_size - FIL_PAGE_FCRC32_END_LSN,
static_cast<uint32_t>(newest_lsn));
return buf_flush_assign_full_crc32_checksum(page);
} else {
mach_write_to_8(page + srv_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM,
newest_lsn);
......@@ -907,10 +908,6 @@ buf_flush_init_for_writing(
uint32_t checksum = BUF_NO_CHECKSUM_MAGIC;
if (use_full_checksum) {
return buf_flush_assign_full_crc32_checksum(page);
}
switch (srv_checksum_algorithm_t(srv_checksum_algorithm)) {
case SRV_CHECKSUM_ALGORITHM_INNODB:
case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB:
......
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