mirror of
https://github.com/MariaDB/server.git
synced 2025-01-26 00:34:18 +01:00
a9d00db155
contains a bad and a good copy Clean up the InnoDB doublewrite buffer code. buf_dblwr_init_or_load_pages(): Do not add empty pages to the buffer. buf_dblwr_process(): Do consider changes to pages that are all zero. Do not abort when finding a corrupted copy of a page in the doublewrite buffer, because there could be multiple copies in the doublewrite buffer, and only one of them needs to be good.
17 lines
647 B
Text
17 lines
647 B
Text
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=InnoDB;
|
|
INSERT INTO t1 (b) VALUES ('corrupt me');
|
|
INSERT INTO t1 (b) VALUES ('corrupt me');
|
|
# Backup the t1.ibd before corrupting
|
|
# Corrupt the table
|
|
Munged a string.
|
|
Munged a string.
|
|
SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
|
|
# Write file to make mysql-test-run.pl expect the "crash", but don't
|
|
# start it until it's told to
|
|
# The below SELECT query will crash the server because some pages
|
|
# on the disk are corrupted
|
|
SELECT * FROM t1;
|
|
ERROR HY000: Lost connection to MySQL server during query
|
|
# Restore the original t1.ibd
|
|
# Cleanup
|
|
DROP TABLE t1;
|