mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
BUG#47838, NULL values in ranges was dropped due to missing else part in store_tuple_to_record, added more tests
This commit is contained in:
parent
19ef2eff9c
commit
8ca9f1e987
1 changed files with 26 additions and 0 deletions
|
@ -1,11 +1,37 @@
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue