diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-12-18 20:05:50 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-12-18 20:05:50 +0200 |
commit | 09c5bbf471da46d33cb21bf67166078bbf7e8f8c (patch) | |
tree | 4706a7158538d477bf1dd9e3a41cdd7374605f16 /sql/field.h | |
parent | 682c3bfd259b3184232e5329558094faa0bc8562 (diff) | |
parent | 40088bfc7e100294d622ab32a6e7cbcb79c12eab (diff) | |
download | mariadb-git-09c5bbf471da46d33cb21bf67166078bbf7e8f8c.tar.gz |
Merge 10.0 into 10.1
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h index 154037df767..530f6d083d2 100644 --- a/sql/field.h +++ b/sql/field.h @@ -745,6 +745,10 @@ public: { return store(ls->str, ls->length, cs); } 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); } @@ -1999,6 +2003,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, @@ -2025,7 +2030,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); + 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 *); |