My Project
|
Public Member Functions | |
Field_bit (uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar *bit_ptr_arg, uchar bit_ofs_arg, enum utype unireg_check_arg, const char *field_name_arg) | |
enum_field_types | type () const |
enum ha_base_keytype | key_type () const |
uint32 | key_length () const |
uint32 | max_data_length () const |
uint32 | max_display_length () |
Item_result | result_type () const |
type_conversion_status | reset (void) |
type_conversion_status | store (const char *to, uint length, const CHARSET_INFO *charset) |
type_conversion_status | store (double nr) |
type_conversion_status | store (longlong nr, bool unsigned_val) |
type_conversion_status | store_decimal (const my_decimal *) |
double | val_real (void) |
longlong | val_int (void) |
String * | val_str (String *, String *) |
virtual bool | str_needs_quotes () |
my_decimal * | val_decimal (my_decimal *) |
int | cmp (const uchar *a, const uchar *b) |
int | cmp_binary_offset (uint row_offset) |
int | cmp_max (const uchar *a, const uchar *b, uint max_length) |
int | key_cmp (const uchar *a, const uchar *b) |
int | key_cmp (const uchar *str, uint length) |
int | cmp_offset (uint row_offset) |
void | get_image (uchar *buff, uint length, const CHARSET_INFO *cs) |
void | set_image (const uchar *buff, uint length, const CHARSET_INFO *cs) |
uint | get_key_image (uchar *buff, uint length, imagetype type) |
void | set_key_image (const uchar *buff, uint length) |
void | make_sort_key (uchar *buff, uint length) |
uint32 | pack_length () const |
uint32 | pack_length_in_rec () const |
uint | pack_length_from_metadata (uint field_metadata) |
uint | row_pack_length () const |
bool | compatible_field_size (uint metadata, Relay_log_info *rli, uint16 mflags, int *order_var) |
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) |
virtual void | set_default () |
Field * | new_key_field (MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, uint new_null_bit) |
void | set_bit_ptr (uchar *bit_ptr_arg, uchar bit_ofs_arg) |
bool | eq (Field *field) |
uint | is_equal (Create_field *new_field) |
void | move_field_offset (my_ptrdiff_t ptr_diff) |
void | hash (ulong *nr, ulong *nr2) |
Field_bit * | clone (MEM_ROOT *mem_root) const |
Field_bit * | clone () const |
Public Attributes | |
uchar * | bit_ptr |
uchar | bit_ofs |
uint | bit_len |
uint | bytes_in_rec |
Field_bit* Field_bit::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.
Reimplemented in Field_bit_as_char.
Field_bit* Field_bit::clone | ( | ) | const [inline, virtual] |
Makes a shallow copy of the Field object.
NULL | If memory allocation failed. |
Implements Field.
Reimplemented in Field_bit_as_char.
bool Field_bit::compatible_field_size | ( | uint | metadata, |
Relay_log_info * | rli, | ||
uint16 | mflags, | ||
int * | order_var | ||
) | [virtual] |
Check to see if field size is compatible with destination.
This method is used in row-based replication to verify that the slave's field size is less than or equal to the master's field size. The encoded field metadata (from the master or source) is decoded and compared to the size of this field (the slave or destination).
field_metadata | Encoded size in field metadata |
order_var | Pointer to variable where the order between the source field and this field will be returned. |
true
Reimplemented from Field.
uint Field_bit::is_equal | ( | Create_field * | new_field | ) | [virtual] |
void Field_bit::make_sort_key | ( | uchar * | buff, |
uint | length | ||
) | [inline, 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.
uint32 Field_bit::max_data_length | ( | ) | const [inline, virtual] |
Get the maximum size of the data in packed format.
Reimplemented from Field.
uchar * Field_bit::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.
uint Field_bit::pack_length_from_metadata | ( | uint | field_metadata | ) | [virtual] |
Returns the number of bytes field uses in row-based replication row packed size.
This method is used in row-based replication to determine the number of bytes that the field consumes in the row record format. This is used to skip fields in the master that do not exist on the slave.
field_metadata | Encoded size in field metadata |
Reimplemented from Field.
const uchar * Field_bit::unpack | ( | uchar * | to, |
const uchar * | from, | ||
uint | param_data, | ||
bool | low_byte_first | ||
) | [virtual] |
Unpack a bit field from row data.
This method is used to unpack a bit 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 | Bit length (upper) and length (lower) values |
Reimplemented from Field.