My Project
|
Public Member Functions | |
Field_blob (uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, TABLE_SHARE *share, uint blob_pack_length, const CHARSET_INFO *cs) | |
Field_blob (uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, const CHARSET_INFO *cs) | |
Field_blob (uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, const CHARSET_INFO *cs, bool set_packlength) | |
Field_blob (uint32 packlength_arg) | |
enum_field_types | type () const |
bool | match_collation_to_optimize_range () const |
enum ha_base_keytype | key_type () const |
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) |
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) |
int | cmp (const uchar *a, uint32 a_length, const uchar *b, uint32 b_length) |
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) |
uint32 | key_length () const |
void | make_sort_key (uchar *buff, uint length) |
uint32 | pack_length () const |
uint32 | pack_length_no_ptr () const |
uint | row_pack_length () const |
uint32 | sort_length () const |
virtual uint32 | max_data_length () const |
type_conversion_status | reset (void) |
void | reset_fields () |
uint32 | get_field_buffer_size (void) |
void | store_length (uchar *i_ptr, uint i_packlength, uint32 i_number) |
void | store_length (uint32 number) |
uint32 | get_length (uint row_offset=0) |
uint32 | get_length (const uchar *ptr, uint packlength, bool low_byte_first) |
uint32 | get_length (const uchar *ptr_arg) |
void | put_length (uchar *pos, uint32 length) |
void | get_ptr (uchar **str) |
void | get_ptr (uchar **str, uint row_offset) |
void | set_ptr (uchar *length, uchar *data) |
void | set_ptr_offset (my_ptrdiff_t ptr_diff, uint32 length, uchar *data) |
void | set_ptr (uint32 length, uchar *data) |
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 |
bool | copy () |
Field_blob * | clone (MEM_ROOT *mem_root) const |
Field_blob * | clone () 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) |
uint | packed_col_length (const uchar *col_ptr, uint length) |
uint | max_packed_col_length (uint max_length) |
void | free () |
void | clear_temporary () |
bool | has_charset (void) const |
uint32 | max_display_length () |
uint32 | char_length () |
uint | is_equal (Create_field *new_field) |
bool | in_read_set () |
bool | in_write_set () |
Static Public Member Functions | |
static void | store_length (uchar *i_ptr, uint i_packlength, uint32 i_number, bool low_byte_first) |
Protected Member Functions | |
void | store_ptr_and_length (const char *from, uint32 length) |
Protected Attributes | |
uint | packlength |
String | value |
Friends | |
type_conversion_status | field_conv (Field *to, Field *from) |
uint32 Field_blob::char_length | ( | ) | [virtual] |
Field_blob* Field_blob::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_blob* Field_blob::clone | ( | ) | const [inline, virtual] |
Makes a shallow copy of the Field object.
NULL | If memory allocation failed. |
Implements Field.
uint Field_blob::is_equal | ( | Create_field * | new_field | ) | [virtual] |
void Field_blob::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.
virtual uint32 Field_blob::max_data_length | ( | ) | const [inline, virtual] |
Get the maximum size of the data in packed format.
Reimplemented from Field_longstr.
uint32 Field_blob::max_display_length | ( | ) | [virtual] |
uchar * Field_blob::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.
uint32 Field_blob::pack_length_no_ptr | ( | ) | const [inline] |
Return the packed length without the pointer size added.
This is used to determine the size of the actual data in the row buffer.
void Field_blob::put_length | ( | uchar * | pos, |
uint32 | length | ||
) |
Put a blob length field into a record buffer.
Depending on the maximum length of a blob, its length field is put into 1 to 4 bytes. This is a property of the blob object, described by 'packlength'.
pos | Pointer into the record buffer. |
length | The length value to put. |
type_conversion_status Field_blob::store | ( | double | nr | ) | [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.
void Field_blob::store_ptr_and_length | ( | const char * | from, |
uint32 | length | ||
) | [inline, protected] |
Store ptr and length.
const uchar * Field_blob::unpack | ( | uchar * | to, |
const uchar * | from, | ||
uint | param_data, | ||
bool | low_byte_first | ||
) | [virtual] |
Unpack a blob field from row data.
This method is used to unpack a blob field from a master whose size of the field is less than that of the slave. Note: This method is included to satisfy inheritance rules, but is not needed for blob fields. It simply is used as a pass-through to the original unpack() method for blob fields.
to | Destination of the data |
from | Source of the data |
param_data | TRUE if base types should be stored in little- endian format, FALSE if native format should be used. |
Reimplemented from Field.
type_conversion_status field_conv | ( | Field * | to, |
Field * | from | ||
) | [friend] |
Simple quick field convert that is called on insert.
uint Field_blob::packlength [protected] |
The number of bytes used to represent the length of the blob.
String Field_blob::value [protected] |
The 'value'-object is a cache fronting the storage engine.