mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
92f9be495b
With MDEV-12288 and MDEV-13536, the InnoDB purge threads will access pages more often, causing all sorts of debug assertion failures in the B-tree code. Work around this problem by amending the corruption tests with --innodb-purge-rseg-truncate-frequency=1 --skip-innodb-fast-shutdown so that everything will be purged before the server is restarted to deal with the corruption.
20 lines
731 B
Text
20 lines
731 B
Text
# Ensure that purge will not crash on the table after we corrupt it.
|
|
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
|
|
SET GLOBAL innodb_fast_shutdown=0;
|
|
# Create and populate the table to be corrupted
|
|
set global innodb_file_per_table=ON;
|
|
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
|
|
INSERT INTO t1 (b) VALUES ('corrupt me');
|
|
INSERT INTO t1 (b) VALUES ('corrupt me');
|
|
# Corrupt the table
|
|
Munged a string.
|
|
Munged a string.
|
|
# Now t1 is corrupted but we should not crash
|
|
SELECT * FROM t1;
|
|
Got one of the listed errors
|
|
INSERT INTO t1(b) VALUES('abcdef');
|
|
Got one of the listed errors
|
|
UPDATE t1 set b = 'deadbeef' where a = 1;
|
|
Got one of the listed errors
|
|
# Cleanup, this must be possible
|
|
DROP TABLE t1;
|