mariadb/mysql-test/suite/innodb/r/innochecksum_flags_and_skip.result
Thirunarayanan Balathandayuthapani e4f8ab2624 MDEV-37138: Innochecksum fails to handle doublewrite buffer and
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. Doublewrite buffer pages and rewrite checksum of
doublewrite buffer pages are skipped when skip_freed_pages
is enabled.

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.
2025-09-26 15:39:42 +05:30

25 lines
891 B
Text

CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
SET GLOBAL innodb_log_checkpoint_now=ON;
FLUSH TABLE t1 FOR EXPORT;
UNLOCK TABLES;
INSERT INTO t1 SET a=1;
FLUSH TABLE t1 FOR EXPORT;
UNLOCK TABLES;
# Skip InnoDB Doublewrite Buffer
Should not exist when summary excludes dblwr pages
Index ID 23 NOT FOUND
Should exist when summary includes dblwr pages
Index ID 23 FOUND
# restart
CREATE TABLE ibd_1(f1 INT PRIMARY KEY)ENGINE=InnoDB;
INSERT INTO ibd_1 VALUES(1), (2), (3), (4);
# Pass wrong tablespace flag for ibdata2
FOUND 1 /checksum mismatch fails/ in result.log
# Pass wrong tablespace flag for ibdata1
FOUND 1 /Fail: Mismatch between provided tablespace flags/ in result.log
# Pass invalid tablespace flag for ibdata1, skip invalid flag
# read page_size from page 0
# innochecksum should be succesfull
NOT FOUND /Fail/ in result.log
# restart
DROP TABLE t1, ibd_1;