mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug #13179 partition info in mysqldump makes it hard to use dump in different sized cluster
This commit is contained in:
@@ -1961,6 +1961,7 @@ static int add_partition_values(File fptr, partition_info *part_info,
|
||||
buf_length A pointer to the returned buffer length
|
||||
use_sql_alloc Allocate buffer from sql_alloc if true
|
||||
otherwise use my_malloc
|
||||
add_default_info Add info generated by default
|
||||
RETURN VALUES
|
||||
NULL error
|
||||
buf, buf_length Buffer and its length
|
||||
@@ -1986,7 +1987,8 @@ static int add_partition_values(File fptr, partition_info *part_info,
|
||||
|
||||
char *generate_partition_syntax(partition_info *part_info,
|
||||
uint *buf_length,
|
||||
bool use_sql_alloc)
|
||||
bool use_sql_alloc,
|
||||
bool add_default_info)
|
||||
{
|
||||
uint i,j, no_parts, no_subparts;
|
||||
partition_element *part_elem;
|
||||
@@ -2013,9 +2015,11 @@ char *generate_partition_syntax(partition_info *part_info,
|
||||
switch (part_info->part_type)
|
||||
{
|
||||
case RANGE_PARTITION:
|
||||
add_default_info= TRUE;
|
||||
err+= add_part_key_word(fptr, range_str);
|
||||
break;
|
||||
case LIST_PARTITION:
|
||||
add_default_info= TRUE;
|
||||
err+= add_part_key_word(fptr, list_str);
|
||||
break;
|
||||
case HASH_PARTITION:
|
||||
@@ -2051,6 +2055,8 @@ char *generate_partition_syntax(partition_info *part_info,
|
||||
err+= add_end_parenthesis(fptr);
|
||||
err+= add_space(fptr);
|
||||
}
|
||||
if (add_default_info)
|
||||
{
|
||||
err+= add_begin_parenthesis(fptr);
|
||||
List_iterator<partition_element> part_it(part_info->partitions);
|
||||
no_parts= part_info->no_parts;
|
||||
@@ -2095,6 +2101,7 @@ char *generate_partition_syntax(partition_info *part_info,
|
||||
else
|
||||
err+= add_end_parenthesis(fptr);
|
||||
} while (++i < no_parts);
|
||||
}
|
||||
if (err)
|
||||
goto close_file;
|
||||
buffer_length= my_seek(fptr, 0L,MY_SEEK_END,MYF(0));
|
||||
|
Reference in New Issue
Block a user