mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 18:25:30 +02:00
MDEV-5667 online alter and changed field/index options
use the Alter_inplace_info::ALTER_COLUMN_OPTION flag if field/column flags were altered. change ha_example to use check_if_supported_inplace_alter() instead of obsolete check_if_incompatible_data()
This commit is contained in:
parent
1b608b0b9c
commit
eb9f422c43
7 changed files with 94 additions and 83 deletions
|
|
@ -5894,9 +5894,6 @@ static bool fill_alter_inplace_info(THD *thd,
|
|||
|
||||
if (new_field)
|
||||
{
|
||||
ha_alter_info->create_info->fields_option_struct[f_ptr - table->field]=
|
||||
new_field->option_struct;
|
||||
|
||||
/* Field is not dropped. Evaluate changes bitmap for it. */
|
||||
|
||||
/*
|
||||
|
|
@ -6008,6 +6005,15 @@ static bool fill_alter_inplace_info(THD *thd,
|
|||
if (new_field->column_format() != field->column_format())
|
||||
ha_alter_info->handler_flags|=
|
||||
Alter_inplace_info::ALTER_COLUMN_COLUMN_FORMAT;
|
||||
|
||||
if (engine_options_differ(field->option_struct, new_field->option_struct,
|
||||
table->file->ht->field_options))
|
||||
{
|
||||
ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_OPTION;
|
||||
ha_alter_info->create_info->fields_option_struct[f_ptr - table->field]=
|
||||
new_field->option_struct;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue