mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-11681: PARTITION BY LIST COLUMNS with default partition: Assertion `part_info->num_list_values' failed in get_part_iter_for_interval_cols_via_map
process adge case with only default partition
This commit is contained in:
@ -310,3 +310,27 @@ create table t1 (a char(1))
|
|||||||
partition by list (ascii(ucase(a)))
|
partition by list (ascii(ucase(a)))
|
||||||
(partition p1 values in (2));
|
(partition p1 values in (2));
|
||||||
ERROR HY000: This partition function is not allowed
|
ERROR HY000: This partition function is not allowed
|
||||||
|
#
|
||||||
|
# MDEV-11681: PARTITION BY LIST COLUMNS with default partition:
|
||||||
|
# Assertion `part_info->num_list_values' failed in
|
||||||
|
# get_part_iter_for_interval_cols_via_map
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (f int) PARTITION BY LIST COLUMNS (f) (PARTITION pdef DEFAULT);
|
||||||
|
insert into t1 values (1),(2);
|
||||||
|
select * from t1 where f = 1;
|
||||||
|
f
|
||||||
|
1
|
||||||
|
drop table t1;
|
||||||
|
CREATE TABLE t1 (f int, d int) PARTITION BY LIST COLUMNS (f,d) (PARTITION pdef DEFAULT);
|
||||||
|
insert into t1 values (1,1),(2,2);
|
||||||
|
select * from t1 where f = 1 and d = 1 ;
|
||||||
|
f d
|
||||||
|
1 1
|
||||||
|
drop table t1;
|
||||||
|
CREATE TABLE t1 (f int) PARTITION BY LIST (f) (PARTITION pdef DEFAULT);
|
||||||
|
insert into t1 values (1),(2);
|
||||||
|
select * from t1 where f = 1;
|
||||||
|
f
|
||||||
|
1
|
||||||
|
drop table t1;
|
||||||
|
#end of 10.2 tests
|
||||||
|
@ -186,3 +186,26 @@ create table t1 (a char(1))
|
|||||||
partition by list (ascii(ucase(a)))
|
partition by list (ascii(ucase(a)))
|
||||||
(partition p1 values in (2));
|
(partition p1 values in (2));
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-11681: PARTITION BY LIST COLUMNS with default partition:
|
||||||
|
--echo # Assertion `part_info->num_list_values' failed in
|
||||||
|
--echo # get_part_iter_for_interval_cols_via_map
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (f int) PARTITION BY LIST COLUMNS (f) (PARTITION pdef DEFAULT);
|
||||||
|
insert into t1 values (1),(2);
|
||||||
|
select * from t1 where f = 1;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (f int, d int) PARTITION BY LIST COLUMNS (f,d) (PARTITION pdef DEFAULT);
|
||||||
|
insert into t1 values (1,1),(2,2);
|
||||||
|
select * from t1 where f = 1 and d = 1 ;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
CREATE TABLE t1 (f int) PARTITION BY LIST (f) (PARTITION pdef DEFAULT);
|
||||||
|
insert into t1 values (1),(2);
|
||||||
|
select * from t1 where f = 1;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #end of 10.2 tests
|
||||||
|
@ -7703,6 +7703,9 @@ int get_part_iter_for_interval_cols_via_map(partition_info *part_info,
|
|||||||
}
|
}
|
||||||
else if (part_info->part_type == LIST_PARTITION)
|
else if (part_info->part_type == LIST_PARTITION)
|
||||||
{
|
{
|
||||||
|
if (part_info->has_default_partititon() &&
|
||||||
|
part_info->num_parts == 1)
|
||||||
|
DBUG_RETURN(-1); //only DEFAULT partition
|
||||||
get_col_endpoint= get_partition_id_cols_list_for_endpoint;
|
get_col_endpoint= get_partition_id_cols_list_for_endpoint;
|
||||||
part_iter->get_next= get_next_partition_id_list;
|
part_iter->get_next= get_next_partition_id_list;
|
||||||
part_iter->part_info= part_info;
|
part_iter->part_info= part_info;
|
||||||
|
Reference in New Issue
Block a user