summaryrefslogtreecommitdiff
path: root/sql/sql_partition_admin.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-07 11:30:03 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-07 11:30:03 +0200
commit9e11e055ce1461caecbb30e8300dfdcd48af22f1 (patch)
tree48f5dc07a29e44a106c37e7e8e3234c62abbebf6 /sql/sql_partition_admin.cc
parent2b5c9bc2c813ea7963959e515da5d60392c35431 (diff)
parent6b99859fff6b8c0a52ea45965834c9c3fdfc4cb3 (diff)
downloadmariadb-git-9e11e055ce1461caecbb30e8300dfdcd48af22f1.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_partition_admin.cc')
-rw-r--r--sql/sql_partition_admin.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc
index 9e67a21e8f4..a9f179e3a10 100644
--- a/sql/sql_partition_admin.cc
+++ b/sql/sql_partition_admin.cc
@@ -492,7 +492,7 @@ bool Sql_cmd_alter_table_exchange_partition::
partition_element *part_elem;
char *partition_name;
char temp_name[FN_REFLEN+1];
- char part_file_name[FN_REFLEN+1];
+ char part_file_name[2*FN_REFLEN+1];
char swap_file_name[FN_REFLEN+1];
char temp_file_name[FN_REFLEN+1];
uint swap_part_id;
@@ -590,9 +590,9 @@ bool Sql_cmd_alter_table_exchange_partition::
temp_name, "", FN_IS_TMP);
if (!(part_elem= part_table->part_info->get_part_elem(partition_name,
- part_file_name +
- part_file_name_len,
- &swap_part_id)))
+ part_file_name + part_file_name_len,
+ sizeof(part_file_name) - part_file_name_len,
+ &swap_part_id)))
{
// my_error(ER_UNKNOWN_PARTITION, MYF(0), partition_name,
// part_table->alias);