24
24
class Field_double :public Field_real {
26
Field_double(unsigned char *ptr_arg, uint32_t len_arg, unsigned char *null_ptr_arg,
27
unsigned char null_bit_arg,
26
Field_double(uchar *ptr_arg, uint32_t len_arg, uchar *null_ptr_arg,
28
28
enum utype unireg_check_arg, const char *field_name_arg,
29
29
uint8_t dec_arg,bool zero_arg,bool unsigned_arg)
30
30
:Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
34
34
Field_double(uint32_t len_arg, bool maybe_null_arg, const char *field_name_arg,
36
:Field_real((unsigned char*) 0, len_arg, maybe_null_arg ? (unsigned char*) "" : 0, (uint) 0,
36
:Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "" : 0, (uint) 0,
37
37
NONE, field_name_arg, dec_arg, 0, 0)
39
39
Field_double(uint32_t len_arg, bool maybe_null_arg, const char *field_name_arg,
40
40
uint8_t dec_arg, bool not_fixed_arg)
41
:Field_real((unsigned char*) 0, len_arg, maybe_null_arg ? (unsigned char*) "" : 0, (uint) 0,
41
:Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "" : 0, (uint) 0,
42
42
NONE, field_name_arg, dec_arg, 0, 0)
43
43
{not_fixed= not_fixed_arg; }
44
44
enum_field_types type() const { return DRIZZLE_TYPE_DOUBLE;}
45
45
enum ha_base_keytype key_type() const { return HA_KEYTYPE_DOUBLE; }
46
int store(const char *to,uint32_t length, const CHARSET_INFO * const charset);
46
int store(const char *to,uint length, const CHARSET_INFO * const charset);
47
47
int store(double nr);
48
48
int store(int64_t nr, bool unsigned_val);
49
49
int reset(void) { memset(ptr, 0, sizeof(double)); return 0; }
51
51
int64_t val_int(void);
52
52
String *val_str(String*,String *);
53
53
bool send_binary(Protocol *protocol);
54
int cmp(const unsigned char *,const unsigned char *);
55
void sort_string(unsigned char *buff,uint32_t length);
54
int cmp(const uchar *,const uchar *);
55
void sort_string(uchar *buff,uint length);
56
56
uint32_t pack_length() const { return sizeof(double); }
57
uint32_t row_pack_length() { return pack_length(); }
57
uint row_pack_length() { return pack_length(); }
58
58
void sql_type(String &str) const;
60
int do_save_field_metadata(unsigned char *first_byte);
60
int do_save_field_metadata(uchar *first_byte);