mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.2 into bb-10.2-ext
This commit is contained in:
@ -178,7 +178,8 @@ static bool check_exchange_partition(TABLE *table, TABLE *part_table)
|
||||
*/
|
||||
static bool compare_table_with_partition(THD *thd, TABLE *table,
|
||||
TABLE *part_table,
|
||||
partition_element *part_elem)
|
||||
partition_element *part_elem,
|
||||
uint part_id)
|
||||
{
|
||||
HA_CREATE_INFO table_create_info, part_create_info;
|
||||
Alter_info part_alter_info;
|
||||
@ -203,6 +204,7 @@ static bool compare_table_with_partition(THD *thd, TABLE *table,
|
||||
}
|
||||
/* db_type is not set in prepare_alter_table */
|
||||
part_create_info.db_type= part_table->part_info->default_engine_type;
|
||||
((ha_partition*)(part_table->file))->update_part_create_info(&part_create_info, part_id);
|
||||
/*
|
||||
Since we exchange the partition with the table, allow exchanging
|
||||
auto_increment value as well.
|
||||
@ -587,7 +589,8 @@ bool Sql_cmd_alter_table_exchange_partition::
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
if (compare_table_with_partition(thd, swap_table, part_table, part_elem))
|
||||
if (compare_table_with_partition(thd, swap_table, part_table, part_elem,
|
||||
swap_part_id))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
/* Table and partition has same structure/options, OK to exchange */
|
||||
|
Reference in New Issue
Block a user