mirror of
https://github.com/MariaDB/server.git
synced 2025-12-10 06:15:44 +01:00
multiple file tablespace Problem: ======= - innochecksum was incorrectly interpreting doublewrite buffer pages as index pages, causing confusion about stale tables in the system tablespace. - innochecksum fails to parse the multi-file system tablespace Solution: ======== 1. Rewrite checksum of doublewrite buffer pages are skipped. 2. Introduced the option --tablespace-flags which can be used to initialize page size. This option can handle the ibdata2, ibdata3 etc without parsing ibdata1.
109 lines
4.7 KiB
Text
109 lines
4.7 KiB
Text
SET GLOBAL innodb_compression_level=0;
|
|
SELECT @@innodb_compression_level;
|
|
@@innodb_compression_level
|
|
0
|
|
CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
|
INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
|
|
INSERT INTO t1 SELECT * from t1;
|
|
INSERT INTO t1 SELECT * from t1;
|
|
INSERT INTO t1 SELECT * from t1;
|
|
INSERT INTO t1 SELECT * from t1;
|
|
INSERT INTO t1 SELECT * from t1;
|
|
INSERT INTO t1 SELECT * from t1;
|
|
INSERT INTO t1 SELECT * from t1;
|
|
INSERT INTO t1 SELECT * from t1;
|
|
INSERT INTO t1 SELECT * from t1;
|
|
INSERT INTO t1 SELECT * from t1;
|
|
CREATE TABLE t2 (j LONGBLOB) ENGINE = InnoDB
|
|
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
|
|
CREATE TABLE t3 (j LONGBLOB) ENGINE = InnoDB
|
|
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
|
|
CREATE TABLE t4(c1 INT PRIMARY KEY,c2 VARCHAR(20),
|
|
INDEX(c2(10))) ENGINE=InnoDB;
|
|
# stop the server
|
|
|
|
Variables (--variable-name=value)
|
|
and boolean options {FALSE|TRUE} Value (after reading options)
|
|
--------------------------------- ----------------------------------------
|
|
verbose TRUE
|
|
debug FALSE
|
|
count FALSE
|
|
start-page 0
|
|
end-page 0
|
|
page 0
|
|
no-check FALSE
|
|
allow-mismatches 0
|
|
write FALSE
|
|
page-type-summary FALSE
|
|
page-type-dump MYSQLTEST_VARDIR/tmp/dump.txt
|
|
per-page-details FALSE
|
|
log (No default value)
|
|
leaf FALSE
|
|
merge 0
|
|
skip-freed-pages FALSE
|
|
tablespace-flags 4294967295
|
|
[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.
|
|
innochecksum Ver #.#.#
|
|
Copyright (c) YEAR, YEAR , Oracle, MariaDB Corporation Ab and others.
|
|
|
|
InnoDB offline file checksum utility.
|
|
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.
|
|
-V, --version Displays version information and exits.
|
|
-v, --verbose Verbose (prints progress every 5 seconds).
|
|
https://mariadb.com/kb/en/library/creating-a-trace-file/
|
|
-c, --count Print the count of pages in the file and exits.
|
|
-s, --start-page=# Start on this page number (0 based).
|
|
-e, --end-page=# End at this page number (0 based).
|
|
-p, --page=# Check only this page (0 based).
|
|
-n, --no-check Ignore the checksum verification.
|
|
-a, --allow-mismatches=#
|
|
Maximum checksum mismatch allowed.
|
|
-w, --write Rewrite the checksum.
|
|
-S, --page-type-summary
|
|
Display a count of each page type in a tablespace.
|
|
-D, --page-type-dump=name
|
|
Dump the page type info for each page in a tablespace.
|
|
-i, --per-page-details
|
|
Print out per-page detail information.
|
|
-l, --log=name log output.
|
|
-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
|
|
--tablespace-flags=#
|
|
InnoDB tablespace flags (default: 4294967295 = read from
|
|
page 0)
|
|
|
|
Variables (--variable-name=value)
|
|
and boolean options {FALSE|TRUE} Value (after reading options)
|
|
--------------------------------- ----------------------------------------
|
|
verbose FALSE
|
|
count FALSE
|
|
start-page 0
|
|
end-page 0
|
|
page 0
|
|
no-check FALSE
|
|
allow-mismatches 0
|
|
write FALSE
|
|
page-type-summary FALSE
|
|
page-type-dump (No default value)
|
|
per-page-details FALSE
|
|
log (No default value)
|
|
leaf FALSE
|
|
merge 0
|
|
skip-freed-pages FALSE
|
|
tablespace-flags 4294967295
|
|
[3]:# check the both short and long options for "count" and exit
|
|
Number of pages:#
|
|
Number of pages:#
|
|
[4]:# Print the version of innochecksum and exit
|
|
innochecksum Ver #.#.#
|
|
[5]:# check t1.ibd and t2.ibd summary with and without tablespace_flags
|
|
# Restart the DB server
|
|
DROP TABLE t4, t3, t2, t1;
|