mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-12714 Determine Item::field_type() from Item::type_handler()
This commit is contained in:
@ -47,7 +47,6 @@ public:
|
||||
virtual void set(double nr)=0;
|
||||
virtual void set(const char *str,uint length,CHARSET_INFO *cs)=0;
|
||||
virtual void set(longlong nr)=0;
|
||||
virtual enum_field_types field_type() const=0;
|
||||
const Type_handler *type_handler() const=0;
|
||||
void set(const char *str) { set(str,(uint) strlen(str), default_charset()); }
|
||||
void make_field(THD *thd, Send_field *tmp_field)
|
||||
@ -74,7 +73,6 @@ public:
|
||||
}
|
||||
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 set(double nr) { value=nr; }
|
||||
void set(longlong nr) { value=(double) nr; }
|
||||
@ -103,7 +101,6 @@ public:
|
||||
{ max_length=11; }
|
||||
enum Item_result result_type () const { return INT_RESULT; }
|
||||
enum Item_result cmp_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 set(double nr) { value=(longlong) nr; }
|
||||
void set(longlong nr) { value=nr; }
|
||||
@ -124,7 +121,6 @@ public:
|
||||
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; }
|
||||
enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; }
|
||||
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()); }
|
||||
|
Reference in New Issue
Block a user