diff options
author | serg@serg.mysql.com <> | 2001-04-17 14:17:22 +0200 |
---|---|---|
committer | serg@serg.mysql.com <> | 2001-04-17 14:17:22 +0200 |
commit | 389a7c02860460968c84c642e6fe758a08b96c07 (patch) | |
tree | 884e11a1a12c75cdab0c82cf051989c0ce956675 /sql/item_func.cc | |
parent | 801259b669ea6b1329f7bf58f8cbda52f8a3488f (diff) | |
download | mariadb-git-389a7c02860460968c84c642e6fe758a08b96c07.tar.gz |
bugfix: HAVING MATCH
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 6c4e3e34fe3..84bc972608e 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1961,12 +1961,15 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist) while ((item=li++)) { - if (item->type() != Item::FIELD_ITEM || item->fix_fields(thd,tlist) || - !item->used_tables()) + if (item->fix_fields(thd,tlist)) + return 1; + if (item->type() == Item::REF_ITEM) + li.replace(item= *((Item_ref *)item)->ref); + if (item->type() != Item::FIELD_ITEM || !item->used_tables()) return 1; used_tables_cache|=item->used_tables(); } - /* check that all columns comes from the same table */ + /* check that all columns come from the same table */ if (count_bits(used_tables_cache) != 1) return 1; const_item_cache=0; |