Index: mysql-test/suite/innodb/r/innodb_fix_force_recovery.result =================================================================== --- mysql-test/suite/innodb/r/innodb_fix_force_recovery.result (revision 0) +++ mysql-test/suite/innodb/r/innodb_fix_force_recovery.result (revision 0) @@ -0,0 +1,11 @@ +call mtr.add_suppression('InnoDB: Failed to find tablespace for table "mysql"."slave_master_info" in the cache'); +call mtr.add_suppression('InnoDB: Failed to find tablespace for table "mysql"."slave_relay_log_info" in the cache'); +call mtr.add_suppression('InnoDB: Failed to find tablespace for table "mysql"."slave_worker_info" in the cache'); +call mtr.add_suppression('InnoDB: Failed to find tablespace for table "test"."t1" in the cache'); +call mtr.add_suppression('InnoDB: Allocated tablespace'); +CREATE TABLE t1 (a int); +INSERT INTO t1 values (1),(2),(3); +# Stop server +SET GLOBAL innodb_fast_shutdown =1; +# Restart server. +DROP table t1; Index: mysql-test/suite/innodb/t/innodb_fix_force_recovery.test =================================================================== --- mysql-test/suite/innodb/t/innodb_fix_force_recovery.test (revision 0) +++ mysql-test/suite/innodb/t/innodb_fix_force_recovery.test (revision 0) @@ -0,0 +1,39 @@ +--source include/not_embedded.inc +--source include/have_innodb.inc + +call mtr.add_suppression('InnoDB: Failed to find tablespace for table "mysql"."slave_master_info" in the cache'); +call mtr.add_suppression('InnoDB: Failed to find tablespace for table "mysql"."slave_relay_log_info" in the cache'); +call mtr.add_suppression('InnoDB: Failed to find tablespace for table "mysql"."slave_worker_info" in the cache'); +call mtr.add_suppression('InnoDB: Failed to find tablespace for table "test"."t1" in the cache'); +call mtr.add_suppression('InnoDB: Allocated tablespace'); + +#create a table for test +CREATE TABLE t1 (a int); +INSERT INTO t1 values (1),(2),(3); + +#stop the server +--echo # Stop server +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--send_shutdown +--source include/wait_until_disconnected.inc + +#restart the server with --innodb-force-recovery=6 +--exec echo "restart:--innodb-force-recovery=6" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--enable_reconnect +--source include/wait_until_connected_again.inc + +--disable_reconnect +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + +#fix bug#73341: cant't shutdown the server with --innodb-force-recovery=6 +SET GLOBAL innodb_fast_shutdown =1; #default value of innodb_fast_shutdown is 1 + +--send_shutdown +--source include/wait_until_disconnected.inc +--echo # Restart server. +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--enable_reconnect +--source include/wait_until_connected_again.inc + +#cleanup +DROP table t1; Index: storage/innobase/log/log0log.cc =================================================================== --- storage/innobase/log/log0log.cc (revision 6927) +++ storage/innobase/log/log0log.cc (working copy) @@ -2178,7 +2178,8 @@ goto loop; } - if (srv_fast_shutdown == 2) { + if (srv_fast_shutdown == 2 + || srv_force_recovery == SRV_FORCE_NO_LOG_REDO) { /*Make a fast shutdown*/ if (!srv_read_only_mode) { ib_logf(IB_LOG_LEVEL_INFO, "MySQL has requested a very fast shutdown"