1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

finally proper recursive descent for parsing expressions with MATCH ... AGAINST in add_ft_keys()

This commit is contained in:
unknown
2003-07-07 19:02:58 +02:00
parent 7ff9378a34
commit a4c3f0d727
3 changed files with 56 additions and 29 deletions

View File

@ -1676,26 +1676,13 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
{
Item *item;
/*
I'm (Sergei) too lazy to implement proper recursive descent here,
and anyway, nobody will use such a stupid queries
that will require it :-)
May be later...
*/
while ((item=li++))
{
if (item->type() == Item::FUNC_ITEM &&
((Item_func *)item)->functype() == Item_func::FT_FUNC)
{
cond_func=(Item_func_match *)item;
break;
}
}
add_ft_keys(keyuse_array,stat,item,usable_tables);
}
}
if ((!cond_func || cond_func->key == NO_SUCH_KEY) ||
(!(usable_tables & cond_func->table->map)))
if (!cond_func || cond_func->key == NO_SUCH_KEY ||
!(usable_tables & cond_func->table->map))
return;
KEYUSE keyuse;
@ -1707,7 +1694,6 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
VOID(insert_dynamic(keyuse_array,(gptr) &keyuse));
}
static int
sort_keyuse(KEYUSE *a,KEYUSE *b)
{