MDEV-37138 innochecksum misinterprets doublewrite buffer pages

- Innochecksum misinterprets the doublewrite buffer pages
as index pages. This leads the user to think there could be
stale table exist in system tablespace.

- To avoid this confusion, innochecksum wired the skipping
of doublewrite buffer pages to option -r while doing
page dumping or printing the summary of the tablespace
This commit is contained in:
Thirunarayanan Balathandayuthapani
2025-07-02 14:48:45 +05:30
parent 2d5dfc47a9
commit 6b5df03f90

View File

@ -95,6 +95,7 @@ static bool page_type_dump;
char* page_dump_filename = 0;
/* skip the checksum verification & rewrite if page is doublewrite buffer. */
static bool skip_page = 0;
static bool skip_dblwr = false;
const char *dbug_setting = "FALSE";
char* log_filename = NULL;
/* User defined filename for logging. */
@ -794,6 +795,7 @@ parse_page(
str = skip_page ? "Double_write_buffer" : "-";
page_no = mach_read_from_4(page + FIL_PAGE_OFFSET);
if (skip_freed_pages) {
if (skip_dblwr) return;
const byte *des= xdes + XDES_ARR_OFFSET +
xdes_size * ((page_no & (physical_page_size - 1))
/ extent_size);
@ -1832,6 +1834,7 @@ first_non_zero:
if (is_system_tablespace) {
/* enable when page is double write buffer.*/
skip_page = is_page_doublewritebuffer(buf);
skip_dblwr = skip_page;
} else {
skip_page = false;
}