diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-03-02 15:02:13 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-03-02 15:02:13 +0100 |
commit | eb9f422c43406172422eeaaa29dddeff742b6d14 (patch) | |
tree | c269e08c4cf12f100be8210eb08ac087d2f4be7d /sql/sql_table.cc | |
parent | 1b608b0b9c0eae7ddcd35d54a4e9112b3c1c4966 (diff) | |
download | mariadb-git-eb9f422c43406172422eeaaa29dddeff742b6d14.tar.gz |
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()
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index c43ea8c453c..fdb902ee199 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -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 { |