Commit c638051d authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-32798 innodb_fast_shutdown=0 hang after incomplete startup

innodb_preshutdown(): Only wait for active transactions to be terminated
if InnoDB was started and innodb_force_recovery=3 or larger does not
prevent a rollback.

This fixes the following:

./mtr --parallel=auto --mysqld=--innodb-fast-shutdown=0 \
innodb.log_file_size innodb.innodb_force_recovery \
innodb.read_only_recovery innodb.read_only_recover_committed \
mariabackup.apply-log-only-incr
parent 9f83a882
...@@ -1995,7 +1995,7 @@ void innodb_preshutdown() ...@@ -1995,7 +1995,7 @@ void innodb_preshutdown()
better prevent any further changes from being buffered. */ better prevent any further changes from being buffered. */
innodb_change_buffering= 0; innodb_change_buffering= 0;
if (trx_sys.is_initialised()) if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO && srv_was_started)
while (trx_sys.any_active_transactions()) while (trx_sys.any_active_transactions())
os_thread_sleep(1000); os_thread_sleep(1000);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment