Fix for bug #24261 "crash when WHERE contains NOT IN ('<negative value>') for unsigned column type"
When calculating a SEL_TREE for the "c_{i-1} < X < c_i" interval, check if the tree returned for the "-inf < X < c_0" interval is NULL
This commit is contained in:
parent
8471897fbc
commit
32d1ad79b0
@ -342,4 +342,8 @@ select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
|
|||||||
some_id
|
some_id
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
select some_id from t1 where some_id not in('-1', '0');
|
||||||
|
some_id
|
||||||
|
1
|
||||||
|
2
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -231,4 +231,11 @@ insert into t1 values (1),(2);
|
|||||||
select some_id from t1 where some_id not in(2,-1);
|
select some_id from t1 where some_id not in(2,-1);
|
||||||
select some_id from t1 where some_id not in(-4,-1,-4);
|
select some_id from t1 where some_id not in(-4,-1,-4);
|
||||||
select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
|
select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#24261: crash when WHERE contains NOT IN ('<negative value>') for unsigned column type
|
||||||
|
#
|
||||||
|
|
||||||
|
select some_id from t1 where some_id not in('-1', '0');
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -3704,6 +3704,7 @@ static SEL_TREE *get_func_mm_tree(PARAM *param, Item_func *cond_func,
|
|||||||
{
|
{
|
||||||
SEL_ARG *new_interval, *last_val;
|
SEL_ARG *new_interval, *last_val;
|
||||||
if (((new_interval= tree2->keys[idx])) &&
|
if (((new_interval= tree2->keys[idx])) &&
|
||||||
|
(tree->keys[idx]) &&
|
||||||
((last_val= tree->keys[idx]->last())))
|
((last_val= tree->keys[idx]->last())))
|
||||||
{
|
{
|
||||||
new_interval->min_value= last_val->max_value;
|
new_interval->min_value= last_val->max_value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user