mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge bb-10.2-ext into 10.3
This commit is contained in:
14
sql/field.h
14
sql/field.h
@ -842,6 +842,10 @@ public:
|
||||
}
|
||||
virtual double val_real(void)=0;
|
||||
virtual longlong val_int(void)=0;
|
||||
virtual ulonglong val_uint(void)
|
||||
{
|
||||
return (ulonglong) val_int();
|
||||
}
|
||||
virtual bool val_bool(void)= 0;
|
||||
virtual my_decimal *val_decimal(my_decimal *);
|
||||
inline String *val_str(String *str) { return val_str(str, str); }
|
||||
@ -2195,6 +2199,7 @@ private:
|
||||
|
||||
|
||||
class Field_double :public Field_real {
|
||||
longlong val_int_from_real(bool want_unsigned_result);
|
||||
public:
|
||||
Field_double(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
|
||||
uchar null_bit_arg,
|
||||
@ -2232,13 +2237,8 @@ public:
|
||||
int store(longlong nr, bool unsigned_val);
|
||||
int reset(void) { bzero(ptr,sizeof(double)); return 0; }
|
||||
double val_real(void);
|
||||
longlong val_int(void)
|
||||
{
|
||||
Converter_double_to_longlong conv(Field_double::val_real(), false);
|
||||
if (conv.error())
|
||||
conv.push_warning(get_thd(), Field_double::val_real(), false);
|
||||
return conv.result();
|
||||
}
|
||||
longlong val_int(void) { return val_int_from_real(false); }
|
||||
ulonglong val_uint(void) { return (ulonglong) val_int_from_real(true); }
|
||||
String *val_str(String*,String *);
|
||||
bool send_binary(Protocol *protocol);
|
||||
int cmp(const uchar *,const uchar *);
|
||||
|
Reference in New Issue
Block a user