diff options
author | unknown <kaa@polly.local> | 2006-12-08 22:38:03 +0300 |
---|---|---|
committer | unknown <kaa@polly.local> | 2006-12-08 22:38:03 +0300 |
commit | 3288ddf671d3553d7fbf8fea373771d20d089af7 (patch) | |
tree | 1d87e8e5a3d50d59553116288607088657e37db0 | |
parent | 8b5787fa4a065219cfab8a20cd8d629afacf80b8 (diff) | |
parent | 2e758a7c23fda7fada49d0cca547680cf26cafad (diff) | |
download | mariadb-git-3288ddf671d3553d7fbf8fea373771d20d089af7.tar.gz |
Merge polly.local:/tmp/maint/bug24261/my50-bug24261
into polly.local:/home/kaa/src/maint/mysql-5.0-maint
mysql-test/r/func_in.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
sql/opt_range.cc:
Auto merged
-rw-r--r-- | mysql-test/r/func_in.result | 4 | ||||
-rw-r--r-- | mysql-test/t/func_in.test | 7 | ||||
-rw-r--r-- | sql/opt_range.cc | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index a172d04d880..38250173dd1 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -350,5 +350,9 @@ 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; End of 5.0 tests diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index d48606ac6e6..86b0268f008 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -252,6 +252,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; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 23a82c6eda7..f062e0d2a0d 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -3703,7 +3703,8 @@ static SEL_TREE *get_func_mm_tree(PARAM *param, Item_func *cond_func, for (uint idx= 0; idx < param->keys; idx++) { 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()))) { new_interval->min_value= last_val->max_value; |