diff options
author | evgen@sunlight.local <> | 2007-09-24 17:23:40 +0400 |
---|---|---|
committer | evgen@sunlight.local <> | 2007-09-24 17:23:40 +0400 |
commit | 4fd6de8b1aeee1363733ba3af836592776db855e (patch) | |
tree | dff8e299e24252baed98de65a5a6435bbbfcf1c4 /sql/item_cmpfunc.h | |
parent | fae74579e41c609b1997b549f29489855a84d537 (diff) | |
parent | 7ed30b971ce2d23d1028b3f06f872a72910cfd5c (diff) | |
download | mariadb-git-4fd6de8b1aeee1363733ba3af836592776db855e.tar.gz |
Merge sunlight.local:/local_work/27216-bug-5.0-opt-mysql
into sunlight.local:/local_work/merge-5.1-opt-mysql
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 40d0c2dfe91..1a64f9c4211 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -640,6 +640,7 @@ public: class Item_func_coalesce :public Item_func_numhybrid { protected: + enum_field_types cached_field_type; Item_func_coalesce(Item *a, Item *b) :Item_func_numhybrid(a, b) {} public: Item_func_coalesce(List<Item> &list) :Item_func_numhybrid(list) {} @@ -652,13 +653,13 @@ public: enum Item_result result_type () const { return hybrid_type; } const char *func_name() const { return "coalesce"; } table_map not_null_tables() const { return 0; } + enum_field_types field_type() const { return cached_field_type; } }; class Item_func_ifnull :public Item_func_coalesce { protected: - enum_field_types cached_field_type; bool field_type_defined; public: Item_func_ifnull(Item *a, Item *b) :Item_func_coalesce(a,b) {} @@ -677,6 +678,7 @@ public: class Item_func_if :public Item_func { enum Item_result cached_result_type; + enum_field_types cached_field_type; public: Item_func_if(Item *a,Item *b,Item *c) :Item_func(a,b,c), cached_result_type(INT_RESULT) @@ -686,6 +688,7 @@ public: String *val_str(String *str); my_decimal *val_decimal(my_decimal *); enum Item_result result_type () const { return cached_result_type; } + enum_field_types field_type() const { return cached_field_type; } bool fix_fields(THD *, Item **); void fix_length_and_dec(); uint decimal_precision() const; @@ -713,6 +716,7 @@ public: bool is_null(); }; + /* Functions to handle the optimized IN */ @@ -1442,6 +1446,7 @@ public: Item *transform(Item_transformer transformer, uchar *arg); void traverse_cond(Cond_traverser, void *arg, traverse_order order); void neg_arguments(THD *thd); + enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; } bool subst_argument_checker(uchar **arg) { return TRUE; } Item *compile(Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t); |