diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-03-10 16:12:58 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-03-10 16:12:58 +0400 |
commit | a4a48a37c494f9df866ba7194813c0fbb9f36b59 (patch) | |
tree | f9fcd48546357eb6cc41e00b448c111577ef030d /sql/field.h | |
parent | ec8c38a82ec1bb00f681a3f6662bd5c76ebb7c75 (diff) | |
download | mariadb-git-a4a48a37c494f9df866ba7194813c0fbb9f36b59.tar.gz |
MDEV-12199 Split Item_func_{abs|neg|int_val}::fix_length_and_dec() into methods in Type_handler
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h index 63f7d1fa57d..2ed84b82aee 100644 --- a/sql/field.h +++ b/sql/field.h @@ -851,6 +851,10 @@ public: virtual bool str_needs_quotes() { return FALSE; } virtual Item_result result_type () const=0; virtual Item_result cmp_type () const { return result_type(); } + virtual const Type_handler *cast_to_int_type_handler() const + { + return Type_handler::get_handler_by_field_type(type()); + } static bool type_can_have_key_part(enum_field_types); static enum_field_types field_type_merge(enum_field_types, enum_field_types); virtual bool eq(Field *field) @@ -3463,6 +3467,10 @@ public: Field *make_new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type); enum_field_types type() const { return MYSQL_TYPE_STRING; } enum Item_result cmp_type () const { return INT_RESULT; } + const Type_handler *cast_to_int_type_handler() const + { + return &type_handler_longlong; + } enum ha_base_keytype key_type() const; Copy_func *get_copy_func(const Field *from) const { |