mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
correct (finally) condition for MATCH >0, >=0 etc in add_ft_keys (SW#1647)
still no rec. descent
This commit is contained in:
@ -1655,17 +1655,17 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
|||||||
{
|
{
|
||||||
Item_func *arg0=(Item_func *)(func->arguments()[0]),
|
Item_func *arg0=(Item_func *)(func->arguments()[0]),
|
||||||
*arg1=(Item_func *)(func->arguments()[1]);
|
*arg1=(Item_func *)(func->arguments()[1]);
|
||||||
if ((functype == Item_func::GE_FUNC ||
|
if (arg1->const_item() &&
|
||||||
functype == Item_func::GT_FUNC) &&
|
((functype == Item_func::GE_FUNC && arg1->val()> 0) ||
|
||||||
arg0->type() == Item::FUNC_ITEM &&
|
(functype == Item_func::GT_FUNC && arg1->val()>=0)) &&
|
||||||
arg0->functype() == Item_func::FT_FUNC &&
|
arg0->type() == Item::FUNC_ITEM &&
|
||||||
arg1->const_item() && arg1->val()>0)
|
arg0->functype() == Item_func::FT_FUNC)
|
||||||
cond_func=(Item_func_match *) arg0;
|
cond_func=(Item_func_match *) arg0;
|
||||||
else if ((functype == Item_func::LE_FUNC ||
|
else if (arg0->const_item() &&
|
||||||
functype == Item_func::LT_FUNC) &&
|
((functype == Item_func::LE_FUNC && arg0->val()> 0) ||
|
||||||
|
(functype == Item_func::LT_FUNC && arg0->val()>=0)) &&
|
||||||
arg1->type() == Item::FUNC_ITEM &&
|
arg1->type() == Item::FUNC_ITEM &&
|
||||||
arg1->functype() == Item_func::FT_FUNC &&
|
arg1->functype() == Item_func::FT_FUNC)
|
||||||
arg0->const_item() && arg0->val()>0)
|
|
||||||
cond_func=(Item_func_match *) arg1;
|
cond_func=(Item_func_match *) arg1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user