1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Write information about restart in .result

Idea comes from MySQL which does something similar
This commit is contained in:
Michael Widenius
2019-03-25 08:02:22 +02:00
committed by Monty
parent 6fd7a4b601
commit b5615eff0d
231 changed files with 537 additions and 45 deletions

View File

@ -14,24 +14,28 @@ disconnect con1;
# Corrupt FIL_PAGE_OFFSET in bug16720368.ibd,
# and recompute innodb_checksum_algorithm=crc32
# Restart mysqld
# restart
# This will succeed after a clean shutdown, due to
# fil_open_single_table_tablespace(check_space_id=FALSE).
SELECT COUNT(*) FROM bug16720368;
COUNT(*)
8
INSERT INTO bug16720368_1 VALUES(1);
# restart
# The table is unaccessible, because after a crash we will
# validate the tablespace header.
SELECT COUNT(*) FROM bug16720368;
ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
INSERT INTO bug16720368 VALUES(0,1);
ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
# restart: --innodb-force-recovery=3
# The table is readable thanks to innodb-force-recovery.
SELECT COUNT(*) FROM bug16720368;
COUNT(*)
8
INSERT INTO bug16720368 VALUES(0,1);
# Shut down the server cleanly to hide the corruption.
# restart
# The table is accessible, because after a clean shutdown we will
# NOT validate the tablespace header.
# We can modify the existing pages, but we cannot allocate or free
@ -41,6 +45,7 @@ COUNT(*)
9
# Shut down the server to uncorrupt the data.
# Restart the server after uncorrupting the file.
# restart
INSERT INTO bug16720368 VALUES(9,1);
SELECT COUNT(*) FROM bug16720368;
COUNT(*)
@ -64,7 +69,9 @@ connection default;
# Kill the server
disconnect con1;
# Attempt to start without an *.ibd file.
# restart
FOUND 1 /\[ERROR\] InnoDB: Tablespace [0-9]+ was not found at .*test.bug16735660.ibd/ in mysqld.1.err
# restart
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM bug16735660;
a