BUG#18962: Crash of ALTER TABLE .. DROP PARTITION ...

Review fixes
parent a3f152cc
...@@ -88,7 +88,7 @@ partition_info *partition_info::get_clone() ...@@ -88,7 +88,7 @@ partition_info *partition_info::get_clone()
The external routine needing this code is check_partition_info The external routine needing this code is check_partition_info
*/ */
#define MAX_PART_NAME_SIZE 16 #define MAX_PART_NAME_SIZE 8
char *partition_info::create_default_partition_names(uint part_no, uint no_parts, char *partition_info::create_default_partition_names(uint part_no, uint no_parts,
uint start_no) uint start_no)
...@@ -125,7 +125,8 @@ char *partition_info::create_default_partition_names(uint part_no, uint no_parts ...@@ -125,7 +125,8 @@ char *partition_info::create_default_partition_names(uint part_no, uint no_parts
0 Memory allocation error 0 Memory allocation error
*/ */
char *create_subpartition_name(uint subpart_no, const char *part_name) char *partition_info::create_subpartition_name(uint subpart_no,
const char *part_name)
{ {
uint size_alloc= strlen(part_name) + MAX_PART_NAME_SIZE; uint size_alloc= strlen(part_name) + MAX_PART_NAME_SIZE;
char *ptr= sql_calloc(size_alloc); char *ptr= sql_calloc(size_alloc);
......
...@@ -257,6 +257,7 @@ class partition_info : public Sql_alloc ...@@ -257,6 +257,7 @@ class partition_info : public Sql_alloc
bool set_up_default_subpartitions(handler *file, ulonglong max_rows); bool set_up_default_subpartitions(handler *file, ulonglong max_rows);
char *create_default_partition_names(uint part_no, uint no_parts, char *create_default_partition_names(uint part_no, uint no_parts,
uint start_no); uint start_no);
char *create_subpartition_name(uint subpart_no, const char *part_name);
bool has_unique_name(partition_element *element); bool has_unique_name(partition_element *element);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment