mirror of
https://github.com/MariaDB/server.git
synced 2026-05-11 17:40:11 +02:00
MDEV-15719 ALTER TABLE…ALGORITHM=INPLACE is unnecessarily refused due to innodb_force_recovery
ha_innobase::check_if_supported_inplace_alter(): Only check for high_level_read_only. Do not unnecessarily refuse ALTER TABLE...ALGORITHM=INPLACE if innodb_force_recovery was specified as 1, 2, or 3. innobase_start_or_create_for_mysql(): Block all writes from SQL if the system tablespace was initialized with 'newraw'.
This commit is contained in:
parent
0d2fffb612
commit
4d9969c216
2 changed files with 4 additions and 6 deletions
|
|
@ -580,11 +580,8 @@ ha_innobase::check_if_supported_inplace_alter(
|
|||
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
if (high_level_read_only
|
||||
|| srv_sys_space.created_new_raw()
|
||||
|| srv_force_recovery) {
|
||||
ha_alter_info->unsupported_reason = (srv_force_recovery)?
|
||||
"Operation not allowed when innodb_forced_recovery > 0." :
|
||||
if (high_level_read_only) {
|
||||
ha_alter_info->unsupported_reason =
|
||||
innobase_get_err_msg(ER_READ_ONLY_MODE);
|
||||
|
||||
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
|
||||
|
|
|
|||
|
|
@ -1504,7 +1504,8 @@ innobase_start_or_create_for_mysql()
|
|||
}
|
||||
|
||||
high_level_read_only = srv_read_only_mode
|
||||
|| srv_force_recovery > SRV_FORCE_NO_TRX_UNDO;
|
||||
|| srv_force_recovery > SRV_FORCE_NO_TRX_UNDO
|
||||
|| srv_sys_space.created_new_raw();
|
||||
|
||||
/* Reset the start state. */
|
||||
srv_start_state = SRV_START_STATE_NONE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue