Loading mysql-test/r/func_in.result +4 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,10 @@ select some_id from t1 where some_id not in(-4,-1,3423534,2342342); some_id 1 2 select some_id from t1 where some_id not in('-1', '0'); some_id 1 2 drop table t1; create table t1(f1 char(1)); insert into t1 values ('a'),('b'),('1'); Loading mysql-test/t/func_in.test +7 −0 Original line number Diff line number Diff line Loading @@ -231,6 +231,13 @@ 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); # # 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; # Loading sql/opt_range.cc +2 −1 Original line number Diff line number Diff line Loading @@ -5013,6 +5013,7 @@ static SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param, Item_func *cond_func, { SEL_ARG *new_interval, *last_val; if (((new_interval= tree2->keys[idx])) && (tree->keys[idx]) && ((last_val= tree->keys[idx]->last()))) { new_interval->min_value= last_val->max_value; Loading Loading
mysql-test/r/func_in.result +4 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,10 @@ select some_id from t1 where some_id not in(-4,-1,3423534,2342342); some_id 1 2 select some_id from t1 where some_id not in('-1', '0'); some_id 1 2 drop table t1; create table t1(f1 char(1)); insert into t1 values ('a'),('b'),('1'); Loading
mysql-test/t/func_in.test +7 −0 Original line number Diff line number Diff line Loading @@ -231,6 +231,13 @@ 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); # # 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; # Loading
sql/opt_range.cc +2 −1 Original line number Diff line number Diff line Loading @@ -5013,6 +5013,7 @@ static SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param, Item_func *cond_func, { SEL_ARG *new_interval, *last_val; if (((new_interval= tree2->keys[idx])) && (tree->keys[idx]) && ((last_val= tree->keys[idx]->last()))) { new_interval->min_value= last_val->max_value; Loading