diff options
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/item.h | 13 | ||||
-rw-r--r-- | sql/item_func.h | 4 | ||||
-rw-r--r-- | sql/item_row.h | 1 | ||||
-rw-r--r-- | sql/item_subselect.cc | 5 | ||||
-rw-r--r-- | sql/item_subselect.h | 1 | ||||
-rw-r--r-- | sql/item_sum.h | 6 | ||||
-rw-r--r-- | sql/item_timefunc.h | 1 | ||||
-rw-r--r-- | sql/item_windowfunc.h | 2 | ||||
-rw-r--r-- | sql/procedure.h | 3 |
10 files changed, 3 insertions, 35 deletions
diff --git a/sql/item.cc b/sql/item.cc index fe025438dfa..c3ecf7d8597 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1694,7 +1694,7 @@ CALL p1(); bool Item_splocal::check_cols(uint n) { DBUG_ASSERT(m_thd->spcont); - if (cmp_type() != ROW_RESULT) + if (Type_handler_hybrid_field_type::cmp_type() != ROW_RESULT) return Item::check_cols(n); if (n != this_item()->cols() || n == 1) diff --git a/sql/item.h b/sql/item.h index 28d64c9c060..2b25df5520e 100644 --- a/sql/item.h +++ b/sql/item.h @@ -751,7 +751,7 @@ public: return type_handler()->result_type(); } /* ... while cmp_type() specifies how it should be compared */ - virtual Item_result cmp_type() const + Item_result cmp_type() const { return type_handler()->cmp_type(); } @@ -2232,8 +2232,6 @@ public: { return Type_handler_hybrid_field_type::type_handler(); } enum Item_result result_type () const { return Type_handler_hybrid_field_type::result_type(); } - enum Item_result cmp_type () const - { return Type_handler_hybrid_field_type::cmp_type(); } uint cols() const { return this_item()->cols(); } Item* element_index(uint i) { return this_item()->element_index(i); } Item** addr(uint i) { return this_item()->addr(i); } @@ -2833,7 +2831,6 @@ public: const Type_handler *type_handler() const { return &type_handler_row; } Item_result result_type() const{ return ROW_RESULT ; } - Item_result cmp_type() const { return ROW_RESULT; } uint cols() const { return arg_count; } bool element_index_by_name(uint *idx, const LEX_CSTRING &name) const; Item* element_index(uint i) { return arg_count ? args[i] : this; } @@ -3094,8 +3091,6 @@ public: { return Type_handler_hybrid_field_type::type_handler(); } enum Item_result result_type () const { return Type_handler_hybrid_field_type::result_type(); } - enum Item_result cmp_type () const - { return Type_handler_hybrid_field_type::cmp_type(); } Item_param(THD *thd, const LEX_CSTRING *name_arg, uint pos_in_query_arg, uint len_in_query_arg); @@ -3913,7 +3908,6 @@ public: enum Type type() const { return DATE_ITEM; } bool eq(const Item *item, bool binary_cmp) const; enum Item_result result_type () const { return STRING_RESULT; } - Item_result cmp_type() const { return TIME_RESULT; } bool check_partition_func_processor(void *int_arg) {return FALSE;} @@ -5031,8 +5025,6 @@ public: { return Type_handler_hybrid_field_type::type_handler(); } enum Item_result result_type () const { return Type_handler_hybrid_field_type::result_type(); } - enum Item_result cmp_type () const - { return Type_handler_hybrid_field_type::cmp_type(); } void make_field(THD *thd, Send_field *field) { item->make_field(thd, field); } table_map used_tables() const { return (table_map) 1L; } @@ -5561,8 +5553,6 @@ public: { return Type_handler_hybrid_field_type::type_handler(); } enum Item_result result_type () const { return Type_handler_hybrid_field_type::result_type(); } - enum Item_result cmp_type () const - { return Type_handler_hybrid_field_type::cmp_type(); } virtual void keep_array() {} virtual void print(String *str, enum_query_type query_type); @@ -5685,7 +5675,6 @@ public: bool cache_value(); bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate); int save_in_field(Field *field, bool no_conversions); - Item_result cmp_type() const { return TIME_RESULT; } void store_packed(longlong val_arg, Item *example); /* Having a clone_item method tells optimizer that this object diff --git a/sql/item_func.h b/sql/item_func.h index d975aa92c32..02b2244cc55 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -399,8 +399,6 @@ public: { return Type_handler_hybrid_field_type::type_handler(); } enum Item_result result_type () const { return Type_handler_hybrid_field_type::result_type(); } - enum Item_result cmp_type () const - { return Type_handler_hybrid_field_type::cmp_type(); } Field::geometry_type get_geometry_type() const { return Type_geometry_attributes::get_geometry_type(); }; }; @@ -2298,7 +2296,7 @@ public: void fix_length_and_dec(); Field *create_field_for_create_select(TABLE *table) { - return cmp_type() == STRING_RESULT ? + return Type_handler_hybrid_field_type::cmp_type() == STRING_RESULT ? type_handler_long_blob.make_and_init_table_field(&(Item::name), Record_addr(maybe_null), *this, table) : diff --git a/sql/item_row.h b/sql/item_row.h index 59cb512bfe7..375321e4755 100644 --- a/sql/item_row.h +++ b/sql/item_row.h @@ -91,7 +91,6 @@ public: table_map used_tables() const { return used_tables_cache; }; bool const_item() const { return const_item_cache; }; enum Item_result result_type() const { return ROW_RESULT; } - Item_result cmp_type() const { return ROW_RESULT; } void update_used_tables() { used_tables_and_const_cache_init(); diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 1f8e9f77917..4dc2546866c 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1177,11 +1177,6 @@ enum Item_result Item_singlerow_subselect::result_type() const return engine->result_type(); } -enum Item_result Item_singlerow_subselect::cmp_type() const -{ - return engine->cmp_type(); -} - const Type_handler *Item_singlerow_subselect::type_handler() const { return engine->type_handler(); diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 8637a9c7310..ff6293e6e5c 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -304,7 +304,6 @@ public: bool val_bool(); bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate); enum Item_result result_type() const; - enum Item_result cmp_type() const; const Type_handler *type_handler() const; void fix_length_and_dec(); diff --git a/sql/item_sum.h b/sql/item_sum.h index 07a8a7b4b3b..86ef54d8486 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -785,8 +785,6 @@ public: { return Type_handler_hybrid_field_type::type_handler(); } enum Item_result result_type () const { return Type_handler_hybrid_field_type::result_type(); } - enum Item_result cmp_type () const - { return Type_handler_hybrid_field_type::cmp_type(); } void fix_length_and_dec_double(); void fix_length_and_dec_decimal(); void reset_field(); @@ -1052,8 +1050,6 @@ protected: { return Type_handler_hybrid_field_type::type_handler(); } enum Item_result result_type () const { return Type_handler_hybrid_field_type::result_type(); } - enum Item_result cmp_type () const - { return Type_handler_hybrid_field_type::cmp_type(); } void update_field(); void min_max_update_str_field(); void min_max_update_real_field(); @@ -1406,7 +1402,6 @@ class Item_sum_udf_float :public Item_udf_sum String *val_str(String*str); my_decimal *val_decimal(my_decimal *); enum Item_result result_type () const { return REAL_RESULT; } - enum Item_result cmp_type () const { return REAL_RESULT; } 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); @@ -1644,7 +1639,6 @@ public: enum Sumfunctype sum_func () const {return GROUP_CONCAT_FUNC;} 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; } const Type_handler *type_handler() const { if (too_big_for_varchar()) diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index c0b347681f7..a9a7706ceea 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -528,7 +528,6 @@ public: Item_temporal_func(THD *thd, Item *a, Item *b): Item_func(thd, a, b) {} Item_temporal_func(THD *thd, Item *a, Item *b, Item *c): Item_func(thd, a, b, c) {} enum Item_result result_type () const { return STRING_RESULT; } - Item_result cmp_type() const { return TIME_RESULT; } String *val_str(String *str); longlong val_int() { return val_int_from_date(); } double val_real() { return val_real_from_date(); } diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index 49f8b51ab1c..5e3a28ffade 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -305,8 +305,6 @@ class Item_sum_hybrid_simple : public Item_sum, String *val_str(String *); enum Item_result result_type() const { return Type_handler_hybrid_field_type::result_type(); } - enum Item_result cmp_type() const - { return Type_handler_hybrid_field_type::cmp_type(); } const Type_handler *type_handler() const { return Type_handler_hybrid_field_type::type_handler(); } void update_field(); diff --git a/sql/procedure.h b/sql/procedure.h index 2c718e0d5b9..e3350b21369 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -72,7 +72,6 @@ public: decimals=dec; max_length=float_length(dec); } enum Item_result result_type () const { return REAL_RESULT; } - enum Item_result cmp_type () const { return REAL_RESULT; } const Type_handler *type_handler() const { return &type_handler_double; } void set(double nr) { value=nr; } void set(longlong nr) { value=(double) nr; } @@ -100,7 +99,6 @@ public: Item_proc_int(THD *thd, const char *name_par): Item_proc(thd, name_par) { max_length=11; } enum Item_result result_type () const { return INT_RESULT; } - enum Item_result cmp_type () const { return INT_RESULT; } const Type_handler *type_handler() const { return &type_handler_longlong; } void set(double nr) { value=(longlong) nr; } void set(longlong nr) { value=nr; } @@ -120,7 +118,6 @@ public: Item_proc_string(THD *thd, const char *name_par, uint length): Item_proc(thd, name_par) { this->max_length=length; } enum Item_result result_type () const { return STRING_RESULT; } - enum Item_result cmp_type () const { return STRING_RESULT; } const Type_handler *type_handler() const { return &type_handler_varchar; } void set(double nr) { str_value.set_real(nr, 2, default_charset()); } void set(longlong nr) { str_value.set(nr, default_charset()); } |