mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#19618: Crash for unsigned_col NOT IN (-1, ... )
- When manually constructing a SEL_TREE for "t.key NOT IN(...)", take into account that get_mm_parts may return a tree with type SEL_TREE::IMPOSSIBLE - Added missing OOM checks - Added comments mysql-test/r/func_in.result: Testcase for BUG#19618 mysql-test/t/func_in.test: Testcase for BUG#19618
This commit is contained in:
@ -326,3 +326,20 @@ deallocate prepare s;
|
||||
set @str=NULL;
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
some_id smallint(5) unsigned,
|
||||
key (some_id)
|
||||
);
|
||||
insert into t1 values (1),(2);
|
||||
select some_id from t1 where some_id not in(2,-1);
|
||||
some_id
|
||||
1
|
||||
select some_id from t1 where some_id not in(-4,-1,-4);
|
||||
some_id
|
||||
1
|
||||
2
|
||||
select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
|
||||
some_id
|
||||
1
|
||||
2
|
||||
drop table t1;
|
||||
|
@ -220,3 +220,15 @@ set @str=NULL;
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
|
||||
# BUG#19618: Crash in range optimizer for
|
||||
# "unsigned_keypart NOT IN(negative_number,...)"
|
||||
# (introduced in fix BUG#15872)
|
||||
create table t1 (
|
||||
some_id smallint(5) unsigned,
|
||||
key (some_id)
|
||||
);
|
||||
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(-4,-1,-4);
|
||||
select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user