--source include/have_debug.inc
--source include/have_innodb.inc
--source include/not_embedded.inc

--echo #
--echo # Test printing of InnoDB status during crash recovery
--echo #

--let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err

CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;

BEGIN;
INSERT INTO t1 VALUES (1);

--source include/kill_mysqld.inc
--error 137,3
--exec $MYSQLD_CMD --loose-console --debug=+d,simulate_recovery_lack_of_pages > $SEARCH_FILE 2>&1

--let SEARCH_PATTERN= Difficult to find free blocks
--source include/search_pattern_in_file.inc

--let SEARCH_PATTERN=END OF INNODB MONITOR OUTPUT
--source include/search_pattern_in_file.inc
--remove_file $SEARCH_FILE

--source include/start_mysqld.inc

DROP TABLE t1;
