Skip to content

Commit ff377d3

Browse files
committed
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 2d6c2f2 (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.
1 parent dfe030f commit ff377d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage/innobase/handler/ha_innodb.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4262,7 +4262,7 @@ innobase_end(handlerton*, ha_panic_function)
42624262
}
42634263

42644264
/* Do system tablespace truncation during slow shutdown */
4265-
if (!srv_fast_shutdown
4265+
if (!srv_fast_shutdown && !high_level_read_only
42664266
&& srv_operation == SRV_OPERATION_NORMAL) {
42674267
fsp_system_tablespace_truncate();
42684268
}

0 commit comments

Comments
 (0)