diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-05-06 20:44:05 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-05-06 20:44:05 +0400 |
commit | c898de84b78482932fd5110e4bc40229f109d424 (patch) | |
tree | 0e09ff8bd83ed6ca888b2ed30aa0da5d27c32a22 /sql/item_sum.h | |
parent | 46239f29c6e624da3b516a25433b5dfb97fe12ea (diff) | |
download | mariadb-git-c898de84b78482932fd5110e4bc40229f109d424.tar.gz |
MDEV-12714 Determine Item::field_type() from Item::type_handler()
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index 51bcd6a4b04..07a8a7b4b3b 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -749,7 +749,6 @@ public: String *val_str(String*str); my_decimal *val_decimal(my_decimal *); enum Item_result result_type () const { return INT_RESULT; } - enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; } const Type_handler *type_handler() const { return &type_handler_longlong; } void fix_length_and_dec() { decimals=0; max_length=21; maybe_null=null_value=0; } @@ -784,8 +783,6 @@ public: my_decimal *val_decimal(my_decimal *); const Type_handler *type_handler() const { return Type_handler_hybrid_field_type::type_handler(); } - enum_field_types field_type() const - { return Type_handler_hybrid_field_type::field_type(); } enum Item_result result_type () const { return Type_handler_hybrid_field_type::result_type(); } enum Item_result cmp_type () const @@ -982,7 +979,6 @@ public: Item *copy_or_same(THD* thd); Field *create_tmp_field(bool group, TABLE *table); enum Item_result result_type () const { return REAL_RESULT; } - enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE;} const Type_handler *type_handler() const { return &type_handler_double; } void cleanup() { @@ -1058,8 +1054,6 @@ protected: { return Type_handler_hybrid_field_type::result_type(); } enum Item_result cmp_type () const { return Type_handler_hybrid_field_type::cmp_type(); } - enum enum_field_types field_type() const - { return Type_handler_hybrid_field_type::field_type(); } void update_field(); void min_max_update_str_field(); void min_max_update_real_field(); @@ -1265,7 +1259,6 @@ public: Item_avg_field_double(THD *thd, Item_sum_avg *item) :Item_avg_field(thd, item) { } - enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; } enum Item_result result_type () const { return REAL_RESULT; } const Type_handler *type_handler() const { return &type_handler_double; } longlong val_int() { return val_int_from_real(); } @@ -1287,7 +1280,6 @@ public: f_scale(item->f_scale), dec_bin_size(item->dec_bin_size) { } - enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; } enum Item_result result_type () const { return DECIMAL_RESULT; } const Type_handler *type_handler() const { return &type_handler_newdecimal; } double val_real() { return val_real_from_decimal(); } @@ -1314,7 +1306,6 @@ public: my_decimal *val_decimal(my_decimal *dec_buf) { return val_decimal_from_real(dec_buf); } bool is_null() { update_null_value(); return null_value; } - enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; } const Type_handler *type_handler() const { return &type_handler_double; } enum Item_result result_type () const { return REAL_RESULT; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) @@ -1416,7 +1407,6 @@ class Item_sum_udf_float :public Item_udf_sum my_decimal *val_decimal(my_decimal *); enum Item_result result_type () const { return REAL_RESULT; } enum Item_result cmp_type () const { return REAL_RESULT; } - enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; } const Type_handler *type_handler() const { return &type_handler_double; } void fix_length_and_dec() { fix_num_length_and_dec(); } Item *copy_or_same(THD* thd); @@ -1440,7 +1430,6 @@ public: String *val_str(String*str); my_decimal *val_decimal(my_decimal *); enum Item_result result_type () const { return INT_RESULT; } - enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; } const Type_handler *type_handler() const { return &type_handler_longlong; } void fix_length_and_dec() { decimals=0; max_length=21; } Item *copy_or_same(THD* thd); @@ -1483,7 +1472,6 @@ public: } my_decimal *val_decimal(my_decimal *dec); enum Item_result result_type () const { return STRING_RESULT; } - enum_field_types field_type() const { return string_field_type(); } const Type_handler *type_handler() const { return string_type_handler(); } void fix_length_and_dec(); Item *copy_or_same(THD* thd); @@ -1506,7 +1494,6 @@ public: longlong val_int(); my_decimal *val_decimal(my_decimal *); enum Item_result result_type () const { return DECIMAL_RESULT; } - enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; } const Type_handler *type_handler() const { return &type_handler_newdecimal; } void fix_length_and_dec() { fix_num_length_and_dec(); } Item *copy_or_same(THD* thd); @@ -1658,10 +1645,6 @@ public: const char *func_name() const { return "group_concat("; } virtual Item_result result_type () const { return STRING_RESULT; } virtual Item_result cmp_type () const { return STRING_RESULT; } - enum_field_types field_type() const - { - return Item_func_group_concat::type_handler()->field_type(); - } const Type_handler *type_handler() const { if (too_big_for_varchar()) |