27
27
The maximum space available in a Field_varstring, in bytes. See
30
static const uint MAX_SIZE;
30
static const uint32_t MAX_SIZE;
31
31
/* Store number of bytes used to store length (1 or 2) */
32
32
uint32_t length_bytes;
33
33
Field_varstring(unsigned char *ptr_arg,
34
uint32_t len_arg, uint length_bytes_arg,
34
uint32_t len_arg, uint32_t length_bytes_arg,
35
35
unsigned char *null_ptr_arg, unsigned char null_bit_arg,
36
36
enum utype unireg_check_arg, const char *field_name_arg,
37
37
TABLE_SHARE *share, const CHARSET_INFO * const cs)
76
76
return cmp_max(a, b, UINT32_MAX);
78
void sort_string(unsigned char *buff,uint length);
79
uint get_key_image(unsigned char *buff,uint length, imagetype type);
80
void set_key_image(const unsigned char *buff,uint length);
78
void sort_string(unsigned char *buff,uint32_t length);
79
uint32_t get_key_image(unsigned char *buff,uint32_t length, imagetype type);
80
void set_key_image(const unsigned char *buff,uint32_t length);
81
81
void sql_type(String &str) const;
82
82
virtual unsigned char *pack(unsigned char *to, const unsigned char *from,
83
uint max_length, bool low_byte_first);
84
unsigned char *pack_key(unsigned char *to, const unsigned char *from, uint max_length, bool low_byte_first);
83
uint32_t max_length, bool low_byte_first);
84
unsigned char *pack_key(unsigned char *to, const unsigned char *from, uint32_t max_length, bool low_byte_first);
85
85
unsigned char *pack_key_from_key_image(unsigned char* to, const unsigned char *from,
86
uint max_length, bool low_byte_first);
86
uint32_t max_length, bool low_byte_first);
87
87
virtual const unsigned char *unpack(unsigned char* to, const unsigned char *from,
88
uint param_data, bool low_byte_first);
88
uint32_t param_data, bool low_byte_first);
89
89
const unsigned char *unpack_key(unsigned char* to, const unsigned char *from,
90
uint max_length, bool low_byte_first);
91
int pack_cmp(const unsigned char *a, const unsigned char *b, uint key_length,
90
uint32_t max_length, bool low_byte_first);
91
int pack_cmp(const unsigned char *a, const unsigned char *b, uint32_t key_length,
92
92
bool insert_or_update);
93
int pack_cmp(const unsigned char *b, uint key_length,bool insert_or_update);
93
int pack_cmp(const unsigned char *b, uint32_t key_length,bool insert_or_update);
94
94
int cmp_binary(const unsigned char *a,const unsigned char *b, uint32_t max_length=UINT32_MAX);
95
95
int key_cmp(const unsigned char *,const unsigned char*);
96
int key_cmp(const unsigned char *str, uint length);
97
uint packed_col_length(const unsigned char *to, uint length);
98
uint max_packed_col_length(uint max_length);
96
int key_cmp(const unsigned char *str, uint32_t length);
97
uint32_t packed_col_length(const unsigned char *to, uint32_t length);
98
uint32_t max_packed_col_length(uint32_t max_length);
99
99
uint32_t data_length();
100
100
uint32_t used_length();
101
uint size_of() const { return sizeof(*this); }
101
uint32_t size_of() const { return sizeof(*this); }
102
102
enum_field_types real_type() const { return DRIZZLE_TYPE_VARCHAR; }
103
103
bool has_charset(void) const
104
104
{ return charset() == &my_charset_bin ? false : true; }
105
105
Field *new_field(MEM_ROOT *root, Table *new_table, bool keep_type);
106
106
Field *new_key_field(MEM_ROOT *root, Table *new_table,
107
107
unsigned char *new_ptr, unsigned char *new_null_ptr,
109
uint is_equal(Create_field *new_field);
108
uint32_t new_null_bit);
109
uint32_t is_equal(Create_field *new_field);
110
110
void hash(uint32_t *nr, uint32_t *nr2);
112
112
int do_save_field_metadata(unsigned char *first_byte);