1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

restore ha_example::check_if_incompatible_data(), create_info->fields_option_struct,

create_info->indexes_option_struct lost in the merge.
add test cases.
This commit is contained in:
Sergei Golubchik
2013-07-12 11:36:54 +02:00
parent f4d5dacf43
commit f672d6b7d8
4 changed files with 104 additions and 0 deletions

View File

@@ -5422,6 +5422,9 @@ 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. */
/*
@@ -5661,6 +5664,9 @@ static bool fill_alter_inplace_info(THD *thd,
new_key - ha_alter_info->key_info_buffer;
DBUG_PRINT("info", ("index added: '%s'", new_key->name));
}
else
ha_alter_info->create_info->indexes_option_struct[table_key - table->key_info]=
new_key->option_struct;
}
/*
@@ -6535,8 +6541,15 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
restore_record(table, s->default_values); // Empty record for DEFAULT
if ((create_info->fields_option_struct= (ha_field_option_struct**)
thd->calloc(sizeof(void*) * table->s->fields)) == NULL ||
(create_info->indexes_option_struct= (ha_index_option_struct**)
thd->calloc(sizeof(void*) * table->s->keys)) == NULL)
DBUG_RETURN(1);
create_info->option_list= merge_engine_table_options(table->s->option_list,
create_info->option_list, thd->mem_root);
/*
First collect all fields from table which isn't in drop_list
*/