mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merged
BitKeeper/etc/logging_ok: auto-union BitKeeper/etc/ignore: auto-union acinclude.m4: Auto merged BitKeeper/deleted/.del-rpc_server_ext.h~952741fb85de2b80: Auto merged client/mysqlbinlog.cc: Auto merged mysql-test/r/innodb.result: Auto merged sql-bench/Makefile.am: Auto merged sql/ha_myisam.cc: Auto merged sql/ha_myisammrg.cc: Auto merged sql/sql_list.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged Docs/manual.texi: merge include/mysql_com.h: merge include/mysqld_error.h: merge mysql-test/install_test_db.sh: merge sql/mysql_priv.h: merge sql/mysqld.cc: merge sql/share/czech/errmsg.txt: merge sql/share/danish/errmsg.txt: merge sql/share/dutch/errmsg.txt: merge sql/share/english/errmsg.txt: merge sql/share/estonian/errmsg.txt: merge sql/share/french/errmsg.txt: merge sql/share/german/errmsg.txt: merge sql/share/greek/errmsg.txt: merge sql/share/hungarian/errmsg.txt: merge sql/share/italian/errmsg.txt: merge sql/share/japanese/errmsg.txt: merge sql/share/korean/errmsg.txt: merge sql/share/norwegian-ny/errmsg.txt: merge sql/share/norwegian/errmsg.txt: merge sql/share/polish/errmsg.txt: merge sql/share/portuguese/errmsg.txt: merge sql/share/romanian/errmsg.txt: merge sql/share/russian/errmsg.txt: merge sql/share/slovak/errmsg.txt: merge sql/share/spanish/errmsg.txt: merge sql/share/swedish/errmsg.txt: merge sql/sql_base.cc: merge sql/sql_table.cc: merge
This commit is contained in:
@ -1413,24 +1413,27 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
||||
|
||||
if (cond->type() == Item::FUNC_ITEM)
|
||||
{
|
||||
Item_func *func=(Item_func *)cond,
|
||||
*arg0=(Item_func *)(func->arguments()[0]),
|
||||
*arg1=(Item_func *)(func->arguments()[1]);
|
||||
|
||||
if (func->functype() == Item_func::FT_FUNC)
|
||||
Item_func *func=(Item_func *)cond;
|
||||
Item_func::Functype functype= func->functype();
|
||||
if (functype == Item_func::FT_FUNC)
|
||||
cond_func=(Item_func_match *)cond;
|
||||
else if ((func->functype() == Item_func::GE_FUNC ||
|
||||
func->functype() == Item_func::GT_FUNC) &&
|
||||
arg0->type() == Item::FUNC_ITEM &&
|
||||
arg0->functype() == Item_func::FT_FUNC &&
|
||||
arg1->const_item() && arg1->val()>=0)
|
||||
cond_func=(Item_func_match *)arg0;
|
||||
else if ((func->functype() == Item_func::LE_FUNC ||
|
||||
func->functype() == Item_func::LT_FUNC) &&
|
||||
arg1->type() == Item::FUNC_ITEM &&
|
||||
arg1->functype() == Item_func::FT_FUNC &&
|
||||
arg0->const_item() && arg0->val()>=0)
|
||||
cond_func=(Item_func_match *)arg1;
|
||||
else if (func->arg_count == 2)
|
||||
{
|
||||
Item_func *arg0=(Item_func *)(func->arguments()[0]),
|
||||
*arg1=(Item_func *)(func->arguments()[1]);
|
||||
if ((functype == Item_func::GE_FUNC ||
|
||||
functype == Item_func::GT_FUNC) &&
|
||||
arg0->type() == Item::FUNC_ITEM &&
|
||||
arg0->functype() == Item_func::FT_FUNC &&
|
||||
arg1->const_item() && arg1->val()>=0)
|
||||
cond_func=(Item_func_match *) arg0;
|
||||
else if ((functype == Item_func::LE_FUNC ||
|
||||
functype == Item_func::LT_FUNC) &&
|
||||
arg1->type() == Item::FUNC_ITEM &&
|
||||
arg1->functype() == Item_func::FT_FUNC &&
|
||||
arg0->const_item() && arg0->val()>=0)
|
||||
cond_func=(Item_func_match *) arg1;
|
||||
}
|
||||
}
|
||||
else if (cond->type() == Item::COND_ITEM)
|
||||
{
|
||||
@ -1439,18 +1442,21 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
||||
if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
|
||||
{
|
||||
Item *item;
|
||||
/* I'm too lazy to implement proper recursive descent here,
|
||||
/*
|
||||
I', (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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user