summaryrefslogtreecommitdiff
path: root/sql/sql_partition_admin.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-21 08:12:19 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-21 08:12:19 +0300
commite3d44f5d62672478c40294d6e46d9f066e418cac (patch)
tree44b4d1b9d94ced780d4f369f84eddc36791470be /sql/sql_partition_admin.cc
parentd176be8aeaecdb20a963fbd126929ddcd5bd98f3 (diff)
parentf70865bc9e540767d8afc3cc2cbe0e1c92a8c0be (diff)
downloadmariadb-git-e3d44f5d62672478c40294d6e46d9f066e418cac.tar.gz
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/sql_partition_admin.cc')
-rw-r--r--sql/sql_partition_admin.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc
index 0512e712102..0c1c9fb02de 100644
--- a/sql/sql_partition_admin.cc
+++ b/sql/sql_partition_admin.cc
@@ -179,7 +179,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;
@@ -204,6 +205,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.
@@ -588,7 +590,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 */