diff options
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r-- | sql/partition_info.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 1eee5df2bc5..915477a45ed 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -892,6 +892,7 @@ char* partition_info::find_duplicate_field() */ partition_element *partition_info::get_part_elem(const char *partition_name, char *file_name, + size_t file_name_size, uint32 *part_id) { List_iterator<partition_element> part_it(partitions); @@ -913,10 +914,10 @@ partition_element *partition_info::get_part_elem(const char *partition_name, sub_part_elem->partition_name, partition_name)) { if (file_name) - create_subpartition_name(file_name, "", - part_elem->partition_name, - partition_name, - NORMAL_PART_NAME); + if (create_subpartition_name(file_name, file_name_size, "", + part_elem->partition_name, + partition_name, NORMAL_PART_NAME)) + DBUG_RETURN(NULL); *part_id= j + (i * num_subparts); DBUG_RETURN(sub_part_elem); } @@ -931,8 +932,9 @@ partition_element *partition_info::get_part_elem(const char *partition_name, part_elem->partition_name, partition_name)) { if (file_name) - create_partition_name(file_name, "", partition_name, - NORMAL_PART_NAME, TRUE); + if (create_partition_name(file_name, file_name_size, "", + partition_name, NORMAL_PART_NAME, TRUE)) + DBUG_RETURN(NULL); *part_id= i; DBUG_RETURN(part_elem); } |