1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-06 05:42:06 +03:00

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
This commit is contained in:
Marko Mäkelä
2023-11-14 14:35:51 +02:00
parent 9f83a8822f
commit c638051d80

View File

@@ -1995,7 +1995,7 @@ void innodb_preshutdown()
better prevent any further changes from being buffered. */
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())
os_thread_sleep(1000);
}