Commit 5660fa6b authored by mskold@mysql.com's avatar mskold@mysql.com

Added flag to detect renaming of fields (not supported as fast alter table for...

Added flag to detect renaming of fields (not supported as fast alter table for ndbcluster): psot review comment: cleared flag before checking
parent de28afe2
...@@ -4745,10 +4745,12 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list, ...@@ -4745,10 +4745,12 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
create_info->table_options|= HA_OPTION_PACK_RECORD; create_info->table_options|= HA_OPTION_PACK_RECORD;
/* Check if field was renamed */ /* Check if field was renamed */
field->flags&= ~FIELD_IS_RENAMED;
if (my_strcasecmp(system_charset_info, if (my_strcasecmp(system_charset_info,
field->field_name, field->field_name,
new_field->field_name)) new_field->field_name))
field->flags|= FIELD_IS_RENAMED; field->flags|= FIELD_IS_RENAMED;
/* Evaluate changes bitmap and send to check_if_incompatible_data() */ /* Evaluate changes bitmap and send to check_if_incompatible_data() */
if (!(tmp= field->is_equal(new_field))) if (!(tmp= field->is_equal(new_field)))
DBUG_RETURN(ALTER_TABLE_DATA_CHANGED); DBUG_RETURN(ALTER_TABLE_DATA_CHANGED);
......
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