mirror of
https://github.com/MariaDB/server.git
synced 2026-01-03 10:05: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.
28 lines
1.2 KiB
Text
28 lines
1.2 KiB
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
|
|
Should exist when summary includes dblwr pages
|
|
# 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 /Error: Page 0 checksum mismatch/ in result.log
|
|
# Pass wrong tablespace flag for ibdata1
|
|
FOUND 1 /Error: Mismatch between provided tablespace flags/ in result.log
|
|
# Pass invalid tablespace flag for ibdata1
|
|
FOUND 1 /Error: Provided --tablespace-flags is not valid/ in result.log
|
|
# innochecksum should be succesfull
|
|
NOT FOUND /Fail/ in result.log
|
|
# Create a tablespace with page number > 2^31
|
|
# Test innochecksum with the modified ibdata3
|
|
FOUND 1 /Error: First page of the tablespace file should be 0, but encountered page number 2147483649/ in result.log
|
|
# Test innochecksum with the modified ibdata3 with tablespace flags
|
|
FOUND 1 /Exceeded the maximum allowed checksum mismatch/ in result.log
|
|
# restart
|
|
DROP TABLE t1, ibd_1;
|