mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix for BUG#13317: Make range optimizer able to produce ranges for "view.field IN (c1,c2)"
and "view.field BETWEEN c1 AND c2"
This commit is contained in:
@ -3533,17 +3533,17 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
|
||||
|
||||
switch (cond_func->functype()) {
|
||||
case Item_func::BETWEEN:
|
||||
if (cond_func->arguments()[0]->type() != Item::FIELD_ITEM)
|
||||
if (cond_func->arguments()[0]->real_item()->type() != Item::FIELD_ITEM)
|
||||
DBUG_RETURN(0);
|
||||
field_item= (Item_field*) (cond_func->arguments()[0]);
|
||||
field_item= (Item_field*) (cond_func->arguments()[0]->real_item());
|
||||
value= NULL;
|
||||
break;
|
||||
case Item_func::IN_FUNC:
|
||||
{
|
||||
Item_func_in *func=(Item_func_in*) cond_func;
|
||||
if (func->key_item()->type() != Item::FIELD_ITEM)
|
||||
if (func->key_item()->real_item()->type() != Item::FIELD_ITEM)
|
||||
DBUG_RETURN(0);
|
||||
field_item= (Item_field*) (func->key_item());
|
||||
field_item= (Item_field*) (func->key_item()->real_item());
|
||||
value= NULL;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user