MDEV-34222 Alter operation on redundant table aborts the server

- InnoDB page compression works only on COMPACT or DYNAMIC row
format tables. So InnoDB should throw error when alter table
tries to enable PAGE_COMPRESSED for redundant table.
This commit is contained in:
Thirunarayanan Balathandayuthapani 2024-05-24 13:17:27 +05:30
commit 44b23bb184
3 changed files with 32 additions and 0 deletions

View file

@ -8339,6 +8339,15 @@ field_changed:
DBUG_RETURN(true);
}
if ((ha_alter_info->handler_flags & ALTER_OPTIONS)
&& ctx->page_compression_level
&& !ctx->old_table->not_redundant()) {
my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0),
table_type(),
"PAGE_COMPRESSED=1 ROW_FORMAT=REDUNDANT");
DBUG_RETURN(true);
}
if (!(ha_alter_info->handler_flags & INNOBASE_ALTER_DATA)
&& alter_templ_needs_rebuild(altered_table, ha_alter_info,
ctx->new_table)