1
0
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:
sergefp@mysql.com
2005-09-21 21:36:15 +04:00
parent 468610635b
commit 7aca974fc8
3 changed files with 45 additions and 4 deletions

View File

@ -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;
}