diff options
author | unknown <bell@sanja.is.com.ua> | 2002-07-01 14:14:51 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-07-01 14:14:51 +0300 |
commit | e5b5f45319a9fe1c90710e49faecc6a33eeac486 (patch) | |
tree | df426008e76b78f3cb8ff349e13e07746cb6f44f /sql/item_func.h | |
parent | 969919146e96f7709f32ac882359372a45da7944 (diff) | |
download | mariadb-git-e5b5f45319a9fe1c90710e49faecc6a33eeac486.tar.gz |
subselect in having clause
fixed bug in sum function in subselect
mysql-test/r/subselect.result:
subselect in having clause
mysql-test/t/subselect.test:
subselect in having clause
sql/item.cc:
subselect in having clause
sql/item.h:
subselect in having clause
sql/item_cmpfunc.cc:
subselect in having clause
sql/item_cmpfunc.h:
subselect in having clause
sql/item_func.cc:
subselect in having clause
sql/item_func.h:
subselect in having clause
sql/item_strfunc.h:
subselect in having clause
sql/item_subselect.cc:
subselect in having clause
sql/item_subselect.h:
subselect in having clause
sql/item_uniq.h:
subselect in having clause
sql/sql_base.cc:
subselect in having clause
sql/sql_class.cc:
subselect in having clause
sql/sql_class.h:
subselect in having clause
sql/sql_handler.cc:
subselect in having clause
sql/sql_lex.cc:
subselect in having clause
sql/sql_lex.h:
subselect in having clause
sql/sql_prepare.cc:
subselect in having clause
sql/sql_yacc.yy:
subselect in having clause
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 0056126d50e..86b2a17931d 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -99,7 +99,7 @@ public: } Item_func(List<Item> &list); ~Item_func() {} /* Nothing to do; Items are freed automaticly */ - bool fix_fields(THD *,struct st_table_list *); + bool fix_fields(THD *,struct st_table_list *, Item **ref); void make_field(Send_field *field); table_map used_tables() const; void update_used_tables(); @@ -567,9 +567,10 @@ public: Item_func_field(Item *a,List<Item> &list) :Item_int_func(list),item(a) {} ~Item_func_field() { delete item; } longlong val_int(); - bool fix_fields(THD *thd,struct st_table_list *tlist) + bool fix_fields(THD *thd,struct st_table_list *tlist, Item **ref) { - return (item->fix_fields(thd,tlist) || Item_func::fix_fields(thd,tlist)); + return (item->fix_fields(thd, tlist, &item) || + Item_func::fix_fields(thd, tlist, ref)); } void update_used_tables() { @@ -708,11 +709,11 @@ public: :Item_func(list), udf(udf_arg) {} ~Item_udf_func() {} const char *func_name() const { return udf.name(); } - bool fix_fields(THD *thd,struct st_table_list *tables) + bool fix_fields(THD *thd, struct st_table_list *tables, Item **ref) { - bool res=udf.fix_fields(thd,tables,this,arg_count,args); - used_tables_cache=udf.used_tables_cache; - const_item_cache=udf.const_item_cache; + bool res= udf.fix_fields(thd, tables, this, arg_count, args); + used_tables_cache= udf.used_tables_cache; + const_item_cache= udf.const_item_cache; return res; } Item_result result_type () const { return udf.result_type(); } @@ -867,7 +868,7 @@ public: void update_hash(void *ptr, uint length, enum Item_result type); bool update(); enum Item_result result_type () const { return cached_result_type; } - bool fix_fields(THD *thd,struct st_table_list *tables); + bool fix_fields(THD *thd, struct st_table_list *tables, Item **ref); void fix_length_and_dec(); void print(String *str); const char *func_name() const { return "set_user_var"; } @@ -941,7 +942,7 @@ public: } enum Functype functype() const { return FT_FUNC; } void update_used_tables() {} - bool fix_fields(THD *thd,struct st_table_list *tlist); + bool fix_fields(THD *thd, struct st_table_list *tlist, Item **ref); bool eq(const Item *, bool binary_cmp) const; longlong val_int() { return val()!=0.0; } double val(); |