Commit a99df5ac authored by Mikael Ronstrom's avatar Mikael Ronstrom

BUG#47838, NULL values in ranges was dropped due to missing else part in...

BUG#47838, NULL values in ranges was dropped due to missing else part in store_tuple_to_record, added more tests
parent 53336f15
drop table if exists t1;
create table t1 (a int signed)
partition by list (a)
( partition p0 values in (1, 3, 5, 7, 9, NULL),
partition p1 values in (2, 4, 6, 8, 0));
insert into t1 values (NULL),(0),(1),(2),(2),(4),(4),(4),(8),(8);
select * from t1 where NULL <= a;
a
select * from t1 where a is null;
a
NULL
explain partitions select * from t1 where a is null;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
select * from t1 where a <= 1;
a
1
0
drop table t1;
create table t1 (a int signed)
partition by list column_list(a)
( partition p0 values in (column_list(1), column_list(3), column_list(5),
column_list(7), column_list(9), column_list(NULL)),
partition p1 values in (column_list(2), column_list(4), column_list(6),
column_list(8), column_list(0)));
insert into t1 values (NULL),(0),(1),(2),(2),(4),(4),(4),(8),(8);
select * from t1 where a <= NULL;
a
select * from t1 where a is null;
a
NULL
explain partitions select * from t1 where a is null;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where
select * from t1 where a <= 1;
a
1
......
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