My Project
|
Public Member Functions | |
Field_varstring (uchar *ptr_arg, uint32 len_arg, uint length_bytes_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, TABLE_SHARE *share, const CHARSET_INFO *cs) | |
Field_varstring (uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, TABLE_SHARE *share, const CHARSET_INFO *cs) | |
enum_field_types | type () const |
bool | match_collation_to_optimize_range () const |
enum ha_base_keytype | key_type () const |
uint | row_pack_length () const |
bool | zero_pack () const |
type_conversion_status | reset (void) |
uint32 | pack_length () const |
uint32 | key_length () const |
uint32 | sort_length () const |
type_conversion_status | store (const char *to, uint length, const CHARSET_INFO *charset) |
type_conversion_status | store (longlong nr, bool unsigned_val) |
type_conversion_status | store (double nr) |
double | val_real (void) |
longlong | val_int (void) |
String * | val_str (String *, String *) |
my_decimal * | val_decimal (my_decimal *) |
int | cmp_max (const uchar *, const uchar *, uint max_length) |
int | cmp (const uchar *a, const uchar *b) |
void | make_sort_key (uchar *buff, uint length) |
uint | get_key_image (uchar *buff, uint length, imagetype type) |
void | set_key_image (const uchar *buff, uint length) |
void | sql_type (String &str) const |
virtual uchar * | pack (uchar *to, const uchar *from, uint max_length, bool low_byte_first) |
virtual const uchar * | unpack (uchar *to, const uchar *from, uint param_data, bool low_byte_first) |
int | cmp_binary (const uchar *a, const uchar *b, uint32 max_length=~0L) |
int | key_cmp (const uchar *, const uchar *) |
int | key_cmp (const uchar *str, uint length) |
uint | packed_col_length (const uchar *to, uint length) |
uint | max_packed_col_length (uint max_length) |
uint32 | data_length () |
enum_field_types | real_type () const |
bool | has_charset (void) const |
Field * | new_field (MEM_ROOT *root, TABLE *new_table, bool keep_type) |
Field * | new_key_field (MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, uint new_null_bit) |
Field_varstring * | clone (MEM_ROOT *mem_root) const |
Field_varstring * | clone () const |
uint | is_equal (Create_field *new_field) |
void | hash (ulong *nr, ulong *nr2) |
Public Attributes | |
uint32 | length_bytes |
Static Public Attributes | |
static const uint | MAX_SIZE = UINT_MAX16 |
Field_varstring* Field_varstring::clone | ( | MEM_ROOT * | mem_root | ) | const [inline, virtual] |
Makes a shallow copy of the Field object.
mem_root | MEM_ROOT to use for memory allocation. |
NULL | If memory allocation failed. |
Implements Field.
Field_varstring* Field_varstring::clone | ( | ) | const [inline, virtual] |
Makes a shallow copy of the Field object.
NULL | If memory allocation failed. |
Implements Field.
uint Field_varstring::is_equal | ( | Create_field * | new_field | ) | [virtual] |
int Field_varstring::key_cmp | ( | const uchar * | a, |
const uchar * | b | ||
) | [virtual] |
Compare to key segments (always 2 byte length prefix).
Reimplemented from Field.
int Field_varstring::key_cmp | ( | const uchar * | key_ptr, |
uint | max_key_length | ||
) | [virtual] |
Reimplemented from Field.
void Field_varstring::make_sort_key | ( | uchar * | buff, |
uint | length | ||
) | [virtual] |
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comparison. Integers are always in big-endian regardless of hardware architecture. At most length bytes are written into the buffer.
buff | The buffer, assumed to be at least length bytes. |
length | Number of bytes to write. |
Implements Field.
uchar * Field_varstring::pack | ( | uchar * | to, |
const uchar * | from, | ||
uint | max_length, | ||
bool | low_byte_first | ||
) | [virtual] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented from Field.
type_conversion_status Field_varstring::store | ( | double | nr | ) | [inline, virtual] |
Store double value in Field_string or Field_varstring.
Pretty prints double number into field_length characters buffer.
nr | number |
Reimplemented from Field_str.
const uchar * Field_varstring::unpack | ( | uchar * | to, |
const uchar * | from, | ||
uint | param_data, | ||
bool | low_byte_first | ||
) | [virtual] |
Unpack a varstring field from row data.
This method is used to unpack a varstring field from a master whose size of the field is less than that of the slave.
to | Destination of the data |
from | Source of the data |
param_data | Length bytes from the master's field data |
Reimplemented from Field.