1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-35394 Innochecksum misinterprets freed pages

- Innochecksum misinterprets the freed pages as active one.
This leads the user to think there are too many valid
pages exist.

- To avoid this confusion, innochecksum introduced one
more option --skip-freed-pages and -r to avoid the freed
pages while dumping or printing the summary of the tablespace.

- Innochecksum can safely assume the page is freed if
the respective extent doesn't belong to a segment and marked as
freed in XDES_BITMAP in extent descriptor page.

- Innochecksum shouldn't assume that zero-filled page as extent
descriptor page.

Reviewed-by: Marko Mäkelä
This commit is contained in:
Thirunarayanan Balathandayuthapani
2024-11-27 13:00:51 +05:30
parent 2255be0395
commit 9ba18d1aa0
6 changed files with 74 additions and 21 deletions

View File

@@ -34,6 +34,7 @@ per-page-details FALSE
log (No default value)
leaf FALSE
merge 0
skip-freed-pages FALSE
[1]:# check the both short and long options for "help"
[2]:# Run the innochecksum when file isn't provided.
# It will print the innochecksum usage similar to --help option.
@@ -41,7 +42,7 @@ innochecksum Ver #.#.#
Copyright (c) YEAR, YEAR , Oracle, MariaDB Corporation Ab and others.
InnoDB offline file checksum utility.
Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-i] [-v] [-a <allow mismatches>] [-n] [-S] [-D <page type dump>] [-l <log>] [-l] [-m <merge pages>] <filename or [-]>
Usage: innochecksum [-c] [-r] [-s <start page>] [-e <end page>] [-p <page>] [-i] [-v] [-a <allow mismatches>] [-n] [-S] [-D <page type dump>] [-l <log>] [-l] [-m <merge pages>] <filename or [-]>
See https://mariadb.com/kb/en/library/innochecksum/ for usage hints.
-?, --help Displays this help and exits.
-I, --info Synonym for --help.
@@ -66,6 +67,8 @@ See https://mariadb.com/kb/en/library/innochecksum/ for usage hints.
-f, --leaf Examine leaf index pages
-m, --merge=# leaf page count if merge given number of consecutive
pages
-r, --skip-freed-pages
skip freed pages for the tablespace
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
@@ -84,6 +87,7 @@ per-page-details FALSE
log (No default value)
leaf FALSE
merge 0
skip-freed-pages FALSE
[3]:# check the both short and long options for "count" and exit
Number of pages:#
Number of pages:#

View File

@@ -139,6 +139,7 @@ per-page-details FALSE
log (No default value)
leaf FALSE
merge 0
skip-freed-pages FALSE
[5]: Page type dump for with shortform for tab1.ibd