summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-07-07 19:02:58 +0200
committerunknown <serg@serg.mylan>2003-07-07 19:02:58 +0200
commita4c3f0d7271c6d93b13d2b03b640adb624fd494d (patch)
treecd954446458acf425d9692e722ef35397f9be12d /sql
parent7ff9378a342d6ad11da953de4d92d0e151ff243c (diff)
downloadmariadb-git-a4c3f0d7271c6d93b13d2b03b640adb624fd494d.tar.gz
finally proper recursive descent for parsing expressions with MATCH ... AGAINST in add_ft_keys()
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc20
1 files changed, 3 insertions, 17 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 55f10ab930b..80e329a7f03 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -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)
{