mirror of
https://github.com/MariaDB/server.git
synced 2025-10-04 06:49:12 +02: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. 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.
25 lines
891 B
Text
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;
|