MDEV-11757 KEY_BLOCK_SIZE strangeness when UNCOMPRESSing COMPRESSed InnoDB tables

in ALTER TABLE ... DROP KEY, ADD KEY, don't forget to compare old
and new keys' block sizes. If they differ - the key definition has changed.
This commit is contained in:
Sergei Golubchik 2017-02-22 19:50:27 +01:00
commit 370cf70136
6 changed files with 144 additions and 1 deletions

View file

@ -4209,7 +4209,7 @@ enum_alter_inplace_result
handler::check_if_supported_inplace_alter(TABLE *altered_table,
Alter_inplace_info *ha_alter_info)
{
DBUG_ENTER("check_if_supported_alter");
DBUG_ENTER("handler::check_if_supported_inplace_alter");
HA_CREATE_INFO *create_info= ha_alter_info->create_info;

View file

@ -6429,6 +6429,9 @@ static bool fill_alter_inplace_info(THD *thd,
new_key->user_defined_key_parts))
goto index_changed;
if (table_key->block_size != new_key->block_size)
goto index_changed;
if (engine_options_differ(table_key->option_struct, new_key->option_struct,
table->file->ht->index_options))
goto index_changed;