1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +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"


mysql-test/r/range.result:
  Testcase for BUG#13317
mysql-test/t/range.test:
  Testcase for BUG#13317
This commit is contained in:
unknown
2005-09-21 21:36:15 +04:00
parent da0f9ecef8
commit 0004c431db
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;
}