diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-08-09 19:16:15 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-08-09 19:16:15 -0600 |
commit | 9a6a7bf5f694dae0b33e61301a17f7aa6fcd1b62 (patch) | |
tree | ed06f905f1515a2117cc0c243c526264fccaac77 /sql/item_func.cc | |
parent | 4bb40187438bdfb8b1d8b091399bd01e0e3425c1 (diff) | |
parent | ebb3bd0f75ecb2b89e4fe07c693caa9e09c2ce3a (diff) | |
download | mariadb-git-9a6a7bf5f694dae0b33e61301a17f7aa6fcd1b62.tar.gz |
merged
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
ltmain.sh:
Auto merged
libmysql/Makefile.shared:
Auto merged
libmysql/libmysql.c:
Auto merged
myisam/myisamchk.c:
Auto merged
mysql-test/t/bdb.test:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index b76bee78b2e..66a50eb0ec0 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1954,13 +1954,17 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist) maybe_null=1; join_key=0; - /* Why testing for const_item ? Monty */ - /* I'll remove it later, but this should include modifications to - find_best and auto_close as complement to auto_init code above. SerG */ - /* I'd rather say now that const_item is assumed in quite a bit of - places, so it would be difficult to remove. SerG */ + /* Serg: + I'd rather say now that const_item is assumed in quite a bit of + places, so it would be difficult to remove; If it would ever to be + removed, this should include modifications to find_best and auto_close + as complement to auto_init code above. + */ if (Item_func::fix_fields(thd,tlist) || !const_item()) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"AGAINST"); return 1; + } while ((item=li++)) { @@ -1969,12 +1973,18 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist) if (item->type() == Item::REF_ITEM) li.replace(item= *((Item_ref *)item)->ref); if (item->type() != Item::FIELD_ITEM || !item->used_tables()) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"MATCH"); return 1; + } used_tables_cache|=item->used_tables(); } /* check that all columns come from the same table */ if (count_bits(used_tables_cache) != 1) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"MATCH"); return 1; + } const_item_cache=0; table=((Item_field *)fields.head())->field->table; return 0; |