Commit 7240c97d authored by evgen@moonbone.local's avatar evgen@moonbone.local

opt_range.cc:

  Corrected fix for bug#18165
parent 1e9b5cea
...@@ -3586,8 +3586,7 @@ static SEL_TREE *get_func_mm_tree(PARAM *param, Item_func *cond_func, ...@@ -3586,8 +3586,7 @@ static SEL_TREE *get_func_mm_tree(PARAM *param, Item_func *cond_func,
case Item_func::BETWEEN: case Item_func::BETWEEN:
{ {
int i= (int ) value; if (!value)
if (! i)
{ {
if (inv) if (inv)
{ {
...@@ -3610,8 +3609,8 @@ static SEL_TREE *get_func_mm_tree(PARAM *param, Item_func *cond_func, ...@@ -3610,8 +3609,8 @@ static SEL_TREE *get_func_mm_tree(PARAM *param, Item_func *cond_func,
else else
tree= get_mm_parts(param, cond_func, field, tree= get_mm_parts(param, cond_func, field,
(inv ? (inv ?
(i == 1 ? Item_func::GT_FUNC : Item_func::LT_FUNC) : (value == 1 ? Item_func::GT_FUNC : Item_func::LT_FUNC) :
(i == 1 ? Item_func::LE_FUNC : Item_func::GE_FUNC)), (value == 1 ? Item_func::LE_FUNC : Item_func::GE_FUNC)),
cond_func->arguments()[0], cmp_type); cond_func->arguments()[0], cmp_type);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment