Commit 4d9969c2 authored by Marko Mäkelä's avatar Marko Mäkelä

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'.
parent 0d2fffb6
......@@ -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;
......
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