mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
BUG#19067: Crash for default subpartitioning when altering the table
mysql-test/r/information_schema_part.result: Bug fix sql/partition_element.h: Review fixes sql/sql_partition.cc: Review fixes
This commit is contained in:
parent
dabe83976f
commit
14e1d69aea
3 changed files with 15 additions and 18 deletions
|
@ -119,7 +119,7 @@ SHOW CREATE TABLE t1;
|
|||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY LINEAR HASH (a) (PARTITION p0 VALUES LESS THAN (10) )
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY LINEAR HASH (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = MyISAM)
|
||||
select SUBPARTITION_METHOD FROM information_schema.partitions WHERE
|
||||
table_schema="test" AND table_name="t1";
|
||||
SUBPARTITION_METHOD
|
||||
|
|
|
@ -64,24 +64,20 @@ public:
|
|||
engine_type(NULL),part_state(PART_NORMAL),
|
||||
nodegroup_id(UNDEF_NODEGROUP), has_null_value(FALSE)
|
||||
{
|
||||
subpartitions.empty();
|
||||
list_val_list.empty();
|
||||
}
|
||||
partition_element(partition_element *part_elem)
|
||||
: partition_name(NULL), range_value(0), has_null_value(FALSE)
|
||||
: part_max_rows(part_elem->part_max_rows),
|
||||
part_min_rows(part_elem->part_min_rows),
|
||||
partition_name(NULL),
|
||||
tablespace_name(part_elem->tablespace_name),
|
||||
range_value(0), part_comment(part_elem->part_comment),
|
||||
data_file_name(part_elem->data_file_name),
|
||||
index_file_name(part_elem->index_file_name),
|
||||
engine_type(part_elem->engine_type),
|
||||
part_state(part_elem->part_state),
|
||||
nodegroup_id(part_elem->nodegroup_id),
|
||||
has_null_value(FALSE)
|
||||
{
|
||||
subpartitions.empty();
|
||||
list_val_list.empty();
|
||||
|
||||
part_max_rows= part_elem->part_max_rows;
|
||||
part_min_rows= part_elem->part_min_rows;
|
||||
tablespace_name= part_elem->tablespace_name;
|
||||
part_comment= part_elem->part_comment;
|
||||
data_file_name= part_elem->data_file_name;
|
||||
index_file_name= part_elem->index_file_name;
|
||||
engine_type= part_elem->engine_type;
|
||||
part_state= part_elem->part_state;
|
||||
nodegroup_id= part_elem->nodegroup_id;
|
||||
}
|
||||
~partition_element() {}
|
||||
};
|
||||
|
|
|
@ -1886,9 +1886,10 @@ char *generate_partition_syntax(partition_info *part_info,
|
|||
err+= add_partition_values(fptr, part_info, part_elem);
|
||||
if (!part_info->is_sub_partitioned() ||
|
||||
part_info->use_default_subpartitions)
|
||||
{
|
||||
err+= add_partition_options(fptr, part_elem);
|
||||
if (part_info->is_sub_partitioned() &&
|
||||
(!part_info->use_default_subpartitions))
|
||||
}
|
||||
else
|
||||
{
|
||||
err+= add_space(fptr);
|
||||
err+= add_begin_parenthesis(fptr);
|
||||
|
|
Loading…
Reference in a new issue