diff options
author | unknown <kaa@polly.local> | 2006-11-27 19:12:10 +0300 |
---|---|---|
committer | unknown <kaa@polly.local> | 2006-11-27 19:12:10 +0300 |
commit | 2e758a7c23fda7fada49d0cca547680cf26cafad (patch) | |
tree | 23cfd1de40206e90e471f21d6457c7155943a73f /sql | |
parent | 154c6e06775d6e644fd4e5f863104ab566fc4a68 (diff) | |
download | mariadb-git-2e758a7c23fda7fada49d0cca547680cf26cafad.tar.gz |
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
mysql-test/r/func_in.result:
Added testcase for bug #24261 "crash when WHERE contains NOT IN ('<negative value>') for unsigned column type"
mysql-test/t/func_in.test:
Added testcase for bug #24261 "crash when WHERE contains NOT IN ('<negative value>') for unsigned column type"
sql/opt_range.cc:
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
Diffstat (limited to 'sql')
-rw-r--r-- | sql/opt_range.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 96239315026..efef9361bda 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; |