MDEV-34209 InnoDB is disregarding read-only mode on slow shutdown

innobase_end(): Do not attempt to shrink the system tablespace if
innodb_read_only=ON or innodb_force_recovery>4. This fixes a regression
due to commit 2d6c2f22a4f9844db45d66e063fbf9314889eb1b (MDEV-32452).

This bug was caught when testing a fix of MDEV-34200, which adds
SET GLOBAL innodb_fast_shutdown=0 to the test innodb.undo_upgrade.
This commit is contained in:
Marko Mäkelä 2024-05-22 08:33:43 +03:00
parent dfe030fda6
commit ff377d3bea

View File

@ -4262,7 +4262,7 @@ innobase_end(handlerton*, ha_panic_function)
}
/* Do system tablespace truncation during slow shutdown */
if (!srv_fast_shutdown
if (!srv_fast_shutdown && !high_level_read_only
&& srv_operation == SRV_OPERATION_NORMAL) {
fsp_system_tablespace_truncate();
}