diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-09-17 20:01:38 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-09-18 10:40:26 +0200 |
commit | a5ee77393f93e6b609ae2db53ed683404fd0d588 (patch) | |
tree | 62beadf9f1e3efba6a0de709c69f7856ace8a487 /sql/sql_partition_admin.cc | |
parent | be3490f01f4a3f1df393305c2b29bf07ac8a2564 (diff) | |
download | mariadb-git-a5ee77393f93e6b609ae2db53ed683404fd0d588.tar.gz |
MDEV-13157 Specifying DATA DIRECTORY in tables leads to failing EXCHANGE PARTITION
Diffstat (limited to 'sql/sql_partition_admin.cc')
-rw-r--r-- | sql/sql_partition_admin.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index e7f5e3cb59e..e850677f8d9 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -171,7 +171,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; @@ -196,6 +197,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. @@ -606,7 +608,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 */ |