MySQL 9.1.0
Source Code Documentation
|
#include <field.h>
Public Types | |
enum | enum_auto_flags { NONE = 0 , NEXT_NUMBER = 1 , DEFAULT_NOW = 2 , ON_UPDATE_NOW = 4 , GENERATED_FROM_EXPRESSION = 8 } |
Flags for Field::auto_flags / Create_field::auto_flags bitmaps. More... | |
enum | geometry_type { GEOM_GEOMETRY = 0 , GEOM_POINT = 1 , GEOM_LINESTRING = 2 , GEOM_POLYGON = 3 , GEOM_MULTIPOINT = 4 , GEOM_MULTILINESTRING = 5 , GEOM_MULTIPOLYGON = 6 , GEOM_GEOMETRYCOLLECTION = 7 } |
enum | imagetype { itRAW , itMBR } |
Public Member Functions | |
Field (const Field &)=default | |
void | operator= (Field &)=delete |
bool | has_insert_default_general_value_expression () const |
Checks if the field is marked as having a general expression to generate default values. More... | |
bool | has_insert_default_datetime_value_expression () const |
Checks if the field is marked as having a datetime value expression to generate default values on inserts. More... | |
bool | has_update_default_datetime_value_expression () const |
Checks if the field is marked as having a datetime value expression to generate default values on updates. More... | |
bool | has_insert_default_constant_expression () const |
Checks if the field is marked as having a constant expression to generate default values. More... | |
uchar * | get_null_ptr () |
virtual void | set_field_length (uint32 length) |
virtual void | add_to_cost (CostOfItem *cost) const |
Update '*cost' with the fact that this Field is accessed. More... | |
bool | is_flag_set (unsigned flag) const |
void | set_flag (unsigned flag) |
void | clear_flag (unsigned flag) |
uint32 | all_flags () const |
virtual bool | is_wrapper_field () const |
If true, it's a Create_field_wrapper (a sub-class of Field used during CREATE/ALTER that we mustn't cast to other sub-classes of Field that aren't on a direct path of inheritance, e.g. More... | |
virtual bool | is_unsigned () const |
Whether the field is signed or not. More... | |
bool | is_gcol () const |
bool | is_virtual_gcol () const |
void | set_hidden (dd::Column::enum_hidden_type hidden) |
Sets the hidden type for this field. More... | |
dd::Column::enum_hidden_type | hidden () const |
bool | is_hidden () const |
bool | is_hidden_by_system () const |
bool | is_hidden_by_user () const |
bool | is_field_for_functional_index () const |
Field (uchar *ptr_arg, uint32 length_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg) | |
This is used as a table name when the table structure is not set up. More... | |
virtual | ~Field ()=default |
void | reset_warnings () |
void | set_tmp_nullable () |
Turn on temporary nullability for the field. More... | |
void | reset_tmp_nullable () |
Turn off temporary nullability for the field. More... | |
void | reset_tmp_null () |
Reset temporary NULL value for field. More... | |
void | set_tmp_null () |
Set field to temporary value NULL. More... | |
bool | is_tmp_nullable () const |
bool | is_tmp_null () const |
virtual type_conversion_status | store (const char *to, size_t length, const CHARSET_INFO *cs)=0 |
virtual type_conversion_status | store (double nr)=0 |
virtual type_conversion_status | store (longlong nr, bool unsigned_val)=0 |
virtual type_conversion_status | store_packed (longlong nr) |
Store a temporal value in packed longlong format into a field. More... | |
virtual type_conversion_status | store_decimal (const my_decimal *d)=0 |
virtual type_conversion_status | store_time (MYSQL_TIME *ltime, uint8 dec_arg) |
Store MYSQL_TIME value with the given amount of decimal digits into a field. More... | |
type_conversion_status | store_time (MYSQL_TIME *ltime) |
Store MYSQL_TYPE value into a field when the number of fractional digits is not important or is not know. More... | |
type_conversion_status | store (const char *to, size_t length, const CHARSET_INFO *cs, enum_check_fields check_level) |
virtual double | val_real () const =0 |
virtual longlong | val_int () const =0 |
virtual longlong | val_time_temporal () const |
Returns TIME value in packed longlong format. More... | |
virtual longlong | val_date_temporal () const |
Returns DATE/DATETIME value in packed longlong format. More... | |
virtual longlong | val_time_temporal_at_utc () const |
virtual longlong | val_date_temporal_at_utc () const |
longlong | val_temporal_by_field_type () const |
Returns "native" packed longlong representation of a TIME or DATE/DATETIME field depending on field type. More... | |
virtual my_decimal * | val_decimal (my_decimal *) const =0 |
String * | val_str (String *str) const |
virtual String * | val_str (String *, String *) const =0 |
String * | val_int_as_str (String *val_buffer, bool unsigned_flag) const |
Interpret field value as an integer but return the result as a string. More... | |
virtual bool | str_needs_quotes () const |
virtual Item_result | result_type () const =0 |
virtual Item_result | numeric_context_result_type () const |
Returns Item_result type of a field when it appears in numeric context such as: SELECT time_column + 1; SELECT SUM(time_column); Examples: More... | |
virtual Item_result | cmp_type () const |
virtual Item_result | cast_to_int_type () const |
bool | gcol_expr_is_equal (const Create_field *field) const |
Check whether generated columns' expressions are the same. More... | |
virtual bool | eq (const Field *field) const |
virtual bool | eq_def (const Field *field) const |
virtual uint32 | pack_length () const |
virtual uint32 | pack_length_in_rec () const |
virtual bool | compatible_field_size (uint metadata, Relay_log_info *, uint16, int *order) const |
Check to see if field size is compatible with destination. More... | |
virtual uint | pack_length_from_metadata (uint field_metadata) const |
virtual uint | row_pack_length () const |
int | save_field_metadata (uchar *first_byte) |
virtual uint32 | data_length (ptrdiff_t row_offset=0) const |
virtual uint32 | max_data_length () const |
Get the maximum size of the data in packed format. More... | |
virtual type_conversion_status | reset () |
virtual bool | get_timestamp (my_timeval *tm, int *warnings) const |
Returns a UTC component in struct timeval format. More... | |
virtual void | store_timestamp (const my_timeval *) |
Stores a timestamp value in timeval format in a field. More... | |
virtual void | set_default () |
void | evaluate_insert_default_function () |
Evaluates the INSERT default function and stores the result in the field. More... | |
void | evaluate_update_default_function () |
Evaluates the UPDATE default function, if one exists, and stores the result in the record buffer. More... | |
virtual bool | binary () const |
virtual bool | zero_pack () const |
virtual enum ha_base_keytype | key_type () const |
virtual uint32 | key_length () const |
virtual enum_field_types | type () const =0 |
virtual enum_field_types | real_type () const |
virtual enum_field_types | binlog_type () const |
int | cmp (const uchar *str) const |
virtual int | cmp_max (const uchar *a, const uchar *b, uint max_len) const |
virtual int | cmp (const uchar *, const uchar *) const =0 |
virtual int | cmp_binary (const uchar *a, const uchar *b, uint32 max_length=~0L) const |
virtual int | cmp_offset (ptrdiff_t row_offset) const |
virtual int | cmp_binary_offset (ptrdiff_t row_offset) const |
virtual int | key_cmp (const uchar *a, const uchar *b) const |
virtual int | key_cmp (const uchar *str, uint length) const |
virtual uint | decimals () const |
virtual bool | is_text_key_type () const |
virtual void | sql_type (String &str) const =0 |
bool | is_null (ptrdiff_t row_offset=0) const |
Check whether the full table's row is NULL or the Field has value NULL. More... | |
bool | is_real_null (ptrdiff_t row_offset=0) const |
Check whether the Field has value NULL (temporary or actual). More... | |
bool | is_null_in_record (const uchar *record) const |
Check if the Field has value NULL or the record specified by argument has value NULL for this Field. More... | |
void | set_null (ptrdiff_t row_offset=0) |
Set field to value NULL. More... | |
void | set_notnull (ptrdiff_t row_offset=0) |
Set field to value NOT NULL. More... | |
type_conversion_status | check_constraints (int mysql_errno) |
Check NOT NULL constraint on the field after temporary nullability is disabled. More... | |
void | set_check_for_truncated_fields (enum_check_fields check_for_truncated_fields) |
Remember the value of THD::check_for_truncated_fields to handle possible NOT-NULL constraint errors after BEFORE-trigger execution is finished. More... | |
bool | is_nullable () const |
uint | null_offset (const uchar *record) const |
uint | null_offset () const |
void | set_null_ptr (uchar *p_null_ptr, uint p_null_bit) |
virtual void | make_send_field (Send_field *send_field) const |
Populates a Send_field object with metadata about the column represented by this Field object. More... | |
virtual size_t | make_sort_key (uchar *buff, size_t length) const =0 |
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comparison. More... | |
virtual size_t | make_sort_key (uchar *buff, size_t length, size_t trunc_pos) const |
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comparison. More... | |
virtual bool | optimize_range (uint idx, uint part) const |
Whether this field can be used for index range scans when in the given keypart of the given index. More... | |
virtual bool | can_be_compared_as_longlong () const |
virtual void | mem_free () |
virtual Field * | new_field (MEM_ROOT *root, TABLE *new_table) const |
Field * | new_field (MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, uint new_null_bit) const |
virtual Field * | new_key_field (MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, uint new_null_bit) const |
Field * | new_key_field (MEM_ROOT *root, TABLE *new_table, uchar *new_ptr) const |
virtual Field * | clone (MEM_ROOT *mem_root) const =0 |
Makes a shallow copy of the Field object. More... | |
void | move_field (uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg) |
virtual void | move_field_offset (ptrdiff_t ptr_diff) |
virtual void | get_image (uchar *buff, size_t length, const CHARSET_INFO *) const |
virtual void | set_image (const uchar *buff, size_t length, const CHARSET_INFO *) |
virtual size_t | get_key_image (uchar *buff, size_t length, imagetype type) const |
virtual void | set_key_image (const uchar *buff, size_t length) |
longlong | val_int_offset (ptrdiff_t row_offset) |
longlong | val_int (uchar *new_ptr) |
String * | val_str (String *str, uchar *new_ptr) |
virtual bool | send_to_protocol (Protocol *protocol) const |
Send the value of this field over the protocol using the correct Protocol::store*() function which matches the type of the field. More... | |
virtual uchar * | pack (uchar *to, const uchar *from, size_t max_length) const |
Pack the field into a format suitable for storage and transfer. More... | |
uchar * | pack (uchar *to) const |
virtual const uchar * | unpack (uchar *to, const uchar *from, uint param_data) |
Unpack a field from row data. More... | |
const uchar * | unpack (const uchar *from) |
virtual uchar * | pack_with_metadata_bytes (uchar *to, const uchar *from, uint max_length) const |
This function does the same thing as pack(), except for the difference that max_length does not mean the number of bytes in the output, but the maximum field length from the input (which must be exactly field->max_field_length()). More... | |
virtual bool | pack_diff (uchar **to, ulonglong value_options) const |
Write the field for the binary log in diff format. More... | |
virtual uint | max_packed_col_length () const |
This is a wrapper around pack_length() used by filesort() to determine how many bytes we need for packing "addon fields". More... | |
uint | offset (uchar *record) const |
void | copy_data (ptrdiff_t src_record_offset) |
virtual bool | get_date (MYSQL_TIME *ltime, my_time_flags_t fuzzydate) const |
virtual bool | get_time (MYSQL_TIME *ltime) const |
virtual const CHARSET_INFO * | charset () const |
const CHARSET_INFO * | charset_for_protocol () const |
virtual const CHARSET_INFO * | sort_charset () const |
virtual bool | has_charset () const |
virtual bool | match_collation_to_optimize_range () const |
virtual enum Derivation | derivation () const |
virtual uint | repertoire () const |
virtual void | set_derivation (enum Derivation) |
bool | set_warning (Sql_condition::enum_severity_level level, unsigned int code, int cut_increment) |
Produce warning or note about data saved into field. More... | |
bool | set_warning (Sql_condition::enum_severity_level level, uint code, int cut_increment, const char *view_db, const char *view_name) |
Produce warning or note about data saved into field. More... | |
bool | warn_if_overflow (int op_result) |
Process decimal library return codes and issue warnings for overflow and truncation. More... | |
virtual void | init (TABLE *table_arg) |
virtual uint32 | max_display_length () const =0 |
virtual uint | is_equal (const Create_field *new_field) const |
Whether a field being created is type-compatible with an existing one. More... | |
longlong | convert_decimal2longlong (const my_decimal *val, bool unsigned_flag, bool *has_overflow) |
Conversion from decimal to longlong. More... | |
virtual uint32 | char_length () const |
virtual geometry_type | get_geometry_type () const |
void | dbug_print () const |
ha_storage_media | field_storage_type () const |
void | set_storage_type (ha_storage_media storage_type_arg) |
column_format_type | column_format () const |
void | set_column_format (column_format_type column_format_arg) |
virtual type_conversion_status | validate_stored_val (THD *thd) |
virtual void | hash (ulong *nr, ulong *nr2) const |
virtual ulonglong | get_max_int_value () const |
Get the upper limit of the MySQL integral and floating-point type. More... | |
virtual const uchar * | data_ptr () const |
Return a const pointer to the actual data in the record buffer. More... | |
const uchar * | field_ptr () const |
Return a const pointer to where the field is stored in the record buffer. More... | |
uchar * | field_ptr () |
Return a pointer to where the field is stored in the record buffer. More... | |
void | set_field_ptr (uchar *ptr_arg) |
virtual bool | is_updatable () const |
Checks whether a string field is part of write_set. More... | |
bool | is_part_of_actual_key (THD *thd, uint cur_index, KEY *cur_index_info) const |
Check whether field is part of the index taking the index extensions flag into account. More... | |
Key_map | get_covering_prefix_keys () const |
Get covering prefix keys. More... | |
virtual bool | is_array () const |
Whether the field is a typed array. More... | |
virtual uint32 | get_length_bytes () const |
Return number of bytes the field's length takes. More... | |
bool | handle_old_value () const |
Whether field's old valued have to be handled. More... | |
virtual void | set_field_index (uint16 field_index) |
Sets field index. More... | |
uint16 | field_index () const |
Returns field index. More... | |
Static Public Member Functions | |
static bool | type_can_have_key_part (enum_field_types) |
Check whether a field type can be partially indexed by a key. More... | |
static enum_field_types | field_type_merge (enum_field_types, enum_field_types) |
Return type of which can carry value of both given types in UNION result. More... | |
static Item_result | result_merge_type (enum_field_types) |
Detect Item_result by given field type of UNION merge result. More... | |
Public Attributes | |
TABLE * | table |
Pointer to TABLE object that owns this field. More... | |
const char * | orig_db_name {nullptr} |
Pointer to original database name, only non-NULL for a temporary table. More... | |
const char * | orig_table_name {nullptr} |
Pointer to original table name, only non-NULL for a temporary table. More... | |
const char ** | table_name |
const char * | field_name |
LEX_CSTRING | comment |
Key_map | key_start |
Key_map | part_of_key |
Keys that includes this field except of prefix keys. More... | |
Key_map | part_of_prefixkey |
Prefix keys. More... | |
Key_map | part_of_sortkey |
Key_map | part_of_key_not_extended |
All keys that include this field, but not extended by the storage engine to include primary key columns. More... | |
uint32 | field_length |
uchar | null_bit |
uchar | auto_flags |
Bitmap of flags indicating if field value is auto-generated by default and/or on update, and in which way. More... | |
bool | is_created_from_null_item |
If true, this field was created in create_tmp_field_from_item from a NULL value. More... | |
bool | m_indexed |
True if this field belongs to some index (unlike part_of_key, the index might have only a prefix). More... | |
LEX_CSTRING | m_engine_attribute = EMPTY_CSTR |
LEX_CSTRING | m_secondary_engine_attribute = EMPTY_CSTR |
Value_generator * | gcol_info {nullptr} |
bool | stored_in_db |
Indication that the field is physically stored in tables rather than just generated on SQL queries. More... | |
Value_generator * | m_default_val_expr {nullptr} |
Holds the expression to be used to generate default values. More... | |
Static Public Attributes | |
static constexpr size_t | MAX_VARCHAR_WIDTH {65535} |
static constexpr size_t | MAX_TINY_BLOB_WIDTH {255} |
static constexpr size_t | MAX_SHORT_BLOB_WIDTH {65535} |
static constexpr size_t | MAX_MEDIUM_BLOB_WIDTH {16777215} |
static constexpr size_t | MAX_LONG_BLOB_WIDTH {4294967295} |
Protected Member Functions | |
uchar * | pack_int16 (uchar *to, const uchar *from, size_t max_length) const |
const uchar * | unpack_int16 (uchar *to, const uchar *from) const |
uchar * | pack_int24 (uchar *to, const uchar *from, size_t max_length) const |
const uchar * | unpack_int24 (uchar *to, const uchar *from) const |
uchar * | pack_int32 (uchar *to, const uchar *from, size_t max_length) const |
const uchar * | unpack_int32 (uchar *to, const uchar *from) const |
uchar * | pack_int64 (uchar *to, const uchar *from, size_t max_length) const |
const uchar * | unpack_int64 (uchar *to, const uchar *from) const |
Protected Attributes | |
uchar * | ptr |
Holds the position to the field in record. More... | |
Static Protected Attributes | |
static uchar | dummy_null_buffer = ' ' |
Private Types | |
enum | enum_pushed_warnings { BAD_NULL_ERROR_PUSHED = 1 , NO_DEFAULT_FOR_FIELD_PUSHED = 2 , NO_DEFAULT_FOR_VIEW_FIELD_PUSHED = 4 } |
Private Member Functions | |
virtual int | do_save_field_metadata (uchar *metadata_ptr) const |
Retrieve the field metadata for fields. More... | |
Private Attributes | |
dd::Column::enum_hidden_type | m_hidden |
uchar * | m_null_ptr |
Byte where the NULL bit is stored inside a record. More... | |
bool | m_is_tmp_nullable |
Flag: if the NOT-NULL field can be temporary NULL. More... | |
bool | m_is_tmp_null |
This is a flag with the following semantics: More... | |
enum_check_fields | m_check_for_truncated_fields_saved |
The value of THD::check_for_truncated_fields at the moment of setting m_is_tmp_null attribute. More... | |
uint32 | flags {0} |
uint16 | m_field_index |
unsigned int | m_warnings_pushed |
Flags for Field::auto_flags / Create_field::auto_flags bitmaps.
Enumerator | |
---|---|
NONE | |
NEXT_NUMBER | AUTO_INCREMENT. |
DEFAULT_NOW | DEFAULT CURRENT_TIMESTAMP. |
ON_UPDATE_NOW | ON UPDATE CURRENT_TIMESTAMP. |
GENERATED_FROM_EXPRESSION | DEFAULT (expression) |
|
private |
enum Field::geometry_type |
enum Field::imagetype |
|
default |
Field::Field | ( | uchar * | ptr_arg, |
uint32 | length_arg, | ||
uchar * | null_ptr_arg, | ||
uchar | null_bit_arg, | ||
uchar | auto_flags_arg, | ||
const char * | field_name_arg | ||
) |
This is used as a table name when the table structure is not set up.
|
virtualdefault |
|
virtual |
Update '*cost' with the fact that this Field is accessed.
Reimplemented in Field_str.
|
inline |
|
inlinevirtual |
Reimplemented in Field_temporal, Field_str, and Field_typed_array.
|
inlinevirtual |
Reimplemented in Field_timestampf, Field_timef, Field_datetimef, and Field_typed_array.
|
inlinevirtual |
Reimplemented in Field_longlong, Field_temporal, and Field_year.
|
inlinevirtual |
Reimplemented in Field_json, and Field_enum.
|
inlinevirtual |
Reimplemented in Field_blob, Field_vector, and Field_typed_array.
|
inlinevirtual |
Reimplemented in Create_field_wrapper, Field_num, Field_temporal, Field_str, Field_json, and Field_typed_array.
|
inline |
type_conversion_status Field::check_constraints | ( | int | mysql_errno | ) |
Check NOT NULL constraint on the field after temporary nullability is disabled.
mysql_errno | Warning to report. |
|
inline |
Makes a shallow copy of the Field object.
mem_root | MEM_ROOT to use for memory allocation. |
NULL | If memory allocation failed. |
Implemented in Create_field_wrapper, Field_decimal, Field_new_decimal, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_null, Field_timestamp, Field_timestampf, Field_year, Field_newdate, Field_time, Field_timef, Field_datetime, Field_datetimef, Field_string, Field_varstring, Field_geom, Field_set, Field_bit_as_char, Field_tiny, Field_blob, Field_vector, Field_json, Field_typed_array, Field_enum, and Field_bit.
Implemented in Create_field_wrapper, Field_decimal, Field_new_decimal, Field_tiny, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_null, Field_timestamp, Field_newdate, Field_time, Field_datetime, Field_string, Field_enum, Field_varstring, Field_blob, Field_bit, Field_temporal_with_date_and_timef, and Field_timef.
|
inline |
|
inlinevirtual |
Reimplemented in Field_varstring, Field_json, and Field_blob.
|
inlinevirtual |
Reimplemented in Field_bit.
Reimplemented in Field_varstring, Field_blob, and Field_bit.
|
inlinevirtual |
Reimplemented in Field_bit.
|
inlinevirtual |
Reimplemented in Field_temporal, and Field_enum.
|
inline |
|
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).
The comparison is made so that if the source data (from the master) is less than the target data (on the slave), -1 is returned in *order_var
. This implies that a conversion is necessary, but that it is lossy and can result in truncation of the value.
If the source data is strictly greater than the target data, 1 is returned in *order_var
. This implies that the source type can is contained in the target type and that a conversion is necessary but is non-lossy.
If no conversion is required to fit the source type in the target type, 0 is returned in *order_var
.
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
if this field's size is compatible with the master's field size, false
otherwise. Reimplemented in Field_new_decimal, Field_string, and Field_bit.
longlong Field::convert_decimal2longlong | ( | const my_decimal * | val, |
bool | unsigned_flag, | ||
bool * | has_overflow | ||
) |
Conversion from decimal to longlong.
Checks overflow and returns correct value (min/max) in case of overflow.
val | value to be converted |
unsigned_flag | type of integer to which we convert val |
has_overflow | true if there is overflow |
void Field::copy_data | ( | ptrdiff_t | src_record_offset | ) |
|
inlinevirtual |
Reimplemented in Field_varstring, and Field_blob.
|
inlinevirtual |
Return a const pointer to the actual data in the record buffer.
For most fields, this is the same as field_ptr(), but BLOBs and VARCHARs it is not. Ideally this function should not be used as it makes it hard to change the internal representation of Field.
Reimplemented in Field_varstring, and Field_blob.
|
inline |
|
inlinevirtual |
Reimplemented in Field_num, Field_temporal_with_date_and_timef, Field_timef, Field_str, and Field_typed_array.
|
inlinevirtual |
Reimplemented in Field_num, Field_str, and Field_temporal.
|
inlineprivatevirtual |
Retrieve the field metadata for fields.
This default implementation returns 0 and saves 0 in the metadata_ptr value.
metadata_ptr | First byte of field metadata |
Reimplemented in Field_new_decimal, Field_float, Field_double, Field_string, Field_varstring, Field_enum, Field_bit, Field_blob, Field_temporal_with_date_and_timef, Field_timef, Field_temporal_with_date_and_time, and Field_typed_array.
|
virtual |
true | if the fields are equally defined |
false | if the fields are unequally defined |
Reimplemented in Field_num, and Field_enum.
void Field::evaluate_insert_default_function | ( | ) |
Evaluates the INSERT
default function and stores the result in the field.
If no such function exists for the column, or the function is not valid for the column's data type, invoking this function has no effect.
void Field::evaluate_update_default_function | ( | ) |
Evaluates the UPDATE
default function, if one exists, and stores the result in the record buffer.
If no such function exists for the column, or the function is not valid for the column's data type, invoking this function has no effect.
|
inline |
Returns field index.
|
inline |
Return a pointer to where the field is stored in the record buffer.
Ideally this function should not be used as it makes it hard to change the internal representation of Field.
|
inline |
Return a const pointer to where the field is stored in the record buffer.
Ideally this function should not be used as it makes it hard to change the internal representation of Field.
|
inline |
|
static |
Return type of which can carry value of both given types in UNION result.
a | type for merging |
b | type for merging |
bool Field::gcol_expr_is_equal | ( | const Create_field * | field | ) | const |
Check whether generated columns' expressions are the same.
field | A new field to compare against |
Key_map Field::get_covering_prefix_keys | ( | ) | const |
Get covering prefix keys.
covering | prefix keys. |
|
virtual |
Reimplemented in Field_real, Field_new_decimal, Field_timestamp, Field_timestampf, Field_newdate, Field_time_common, Field_datetime, Field_datetimef, Field_json, and Field_num.
|
inlinevirtual |
Reimplemented in Field_geom.
|
inlinevirtual |
Reimplemented in Field_bit.
|
inlinevirtual |
Reimplemented in Field_string, Field_varstring, Field_bit, Field_blob, and Field_typed_array.
|
inlinevirtual |
Return number of bytes the field's length takes.
Valid only for varchar and typed arrays of varchar
Reimplemented in Field_varstring, and Field_typed_array.
|
inlinevirtual |
Get the upper limit of the MySQL integral and floating-point type.
Reimplemented in Field_tiny, Field_short, Field_medium, Field_long, Field_longlong, Field_float, and Field_double.
|
inline |
|
virtual |
Reimplemented in Field_real, Field_new_decimal, Field_temporal_with_date, Field_time, Field_timef, Field_json, and Field_num.
|
virtual |
Returns a UTC component in struct timeval
format.
This interface makes any column appear to be TIMESTAMP
, i.e. stored in UTC, and returns the UTC component in (optionally fractional) seconds. This means converting to UTC from the current session's time zone for types other than TIMESTAMP
.
This method was expressly written for SELECT UNIX_TIMESTAMP(field)
to avoid conversion from timestamp to MYSQL_TIME and back.
Reimplemented in Field_timestamp, and Field_timestampf.
|
inline |
Whether field's old valued have to be handled.
|
inlinevirtual |
Reimplemented in Field_string, Field_varstring, Field_json, Field_set, Field_blob, and Field_enum.
|
inline |
Checks if the field is marked as having a constant expression to generate default values.
Relevant when re-creating a Create_field from a Field during ALTER.
true | The field has a constant expression as default |
false | The field doesn't have a constant expression as default |
|
inline |
Checks if the field is marked as having a datetime value expression to generate default values on inserts.
true | The field has datetime expression as default |
false | The field doesn't have a datime value expression as default |
|
inline |
Checks if the field is marked as having a general expression to generate default values.
true | The field has general expression as default |
false | The field doesn't have any general expression as default |
|
inline |
Checks if the field is marked as having a datetime value expression to generate default values on updates.
true | The field has datetime expression as default for on update |
false | The field doesn't have a datime value expression as default for on update |
|
virtual |
Reimplemented in Field_varstring, and Field_bit.
|
inline |
|
virtual |
Reimplemented in Field_typed_array.
|
inlinevirtual |
Whether the field is a typed array.
Reimplemented in Field_typed_array.
|
virtual |
Whether a field being created is type-compatible with an existing one.
Used by the ALTER TABLE code to evaluate whether the new definition of a table is compatible with the old definition so that it can determine if data needs to be copied over (table data change). Constraints and generation clause (default value, generation expression) are not checked by this function.
new_field | new field definition from alter. |
IS_EQUAL_YES | if there is no change. |
IS_EQUAL_PACK_LENGTH | if the data are unchanged, but the length requirements have changed |
IS_EQUAL_NO | if there is an incompatible change requiring copy. |
Reimplemented in Field_new_decimal, Field_temporal, Field_varstring, Field_geom, Field_json, Field_enum, Field_bit, Field_num, Field_str, Field_blob, and Field_vector.
|
inline |
|
inline |
|
inline |
|
inline |
true | if this field should be hidden away from users. |
false | is this field is visible to the user. |
|
inline |
true | If this column is hidden either in the storage engine or SQL layer. Either way, it is completely hidden from the user. |
false | Otherwise. |
|
inline |
true | If this column is hidden by the user. |
false | otherwise. |
|
inline |
Check whether the full table's row is NULL or the Field has value NULL.
|
inline |
Check if the Field has value NULL or the record specified by argument has value NULL for this Field.
|
inline |
Check whether field is part of the index taking the index extensions flag into account.
Index extensions are also not applicable to UNIQUE indexes for loose index scans.
[in] | thd | THD object |
[in] | cur_index | Index of the key |
[in] | cur_index_info | key_info object |
true | Field is part of the key |
false | otherwise |
|
inline |
Check whether the Field has value NULL (temporary or actual).
|
inlinevirtual |
Reimplemented in Field_string, Field_varstring, and Field_blob.
|
inline |
true | if the Field has temporary value NULL. |
false | if the Field's value is NOT NULL, or if the temporary NULL-ability flag is reset. |
|
inline |
true | if NULL can be assigned temporary to the Field. |
false | if NULL can not be assigned even temporary to the Field. |
|
inlinevirtual |
Whether the field is signed or not.
Meaningful only for numeric fields and numeric arrays.
Reimplemented in Field_num, and Field_typed_array.
|
inlinevirtual |
Checks whether a string field is part of write_set.
Reimplemented in Field_longstr.
|
inline |
|
inlinevirtual |
If true, it's a Create_field_wrapper (a sub-class of Field used during CREATE/ALTER that we mustn't cast to other sub-classes of Field that aren't on a direct path of inheritance, e.g.
Field_enum).
Reimplemented in Create_field_wrapper.
Reimplemented in Field_varstring, Field_blob, Field_typed_array, and Field_bit.
|
inlinevirtual |
Reimplemented in Field_typed_array, Field_varstring, Field_bit, and Field_blob.
|
inlinevirtual |
Reimplemented in Field_varstring, Field_blob, and Field_typed_array.
|
inlinevirtual |
Reimplemented in Field_decimal, Field_new_decimal, Field_tiny, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_timestamp, Field_newdate, Field_time, Field_datetime, Field_string, Field_varstring, Field_geom, Field_enum, Field_bit_as_char, Field_blob, and Field_bit.
|
virtual |
Populates a Send_field object with metadata about the column represented by this Field object.
The Send_field object is used for sending column metadata to the client.
[out] | send_field | the Send_field object to populate |
Reimplemented in Field_typed_array, Field_str, and Field_vector.
|
pure 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. |
The | number of bytes actually written. |
Implemented in Field_null, Create_field_wrapper, Field_decimal, Field_new_decimal, Field_tiny, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_timestamp, Field_newdate, Field_time, Field_datetime, Field_string, Field_varstring, Field_enum, Field_bit, Field_blob, Field_json, Field_typed_array, Create_field_wrapper, Field_bit, Field_temporal_with_date_and_timef, Field_timef, Field_json, Field_typed_array, and Field_typed_array.
|
inlinevirtual |
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. Field_string, Field_varstring and Field_blob classes are truncated after pos number of characters.
buff | The buffer, assumed to be at least length bytes. |
length | Number of bytes to write. |
trunc_pos | Number of characters which should be included before truncation. |
The | number of bytes actually written. |
Reimplemented in Create_field_wrapper, Field_bit, Field_string, Field_varstring, Field_blob, Field_json, and Field_typed_array.
|
inlinevirtual |
Reimplemented in Field_string, Field_varstring, Field_geom, Field_enum, Field_blob, and Field_typed_array.
|
inlinevirtual |
Get the maximum size of the data in packed format.
Reimplemented in Field_longstr, Field_blob, and Field_vector.
|
pure virtual |
Implemented in Create_field_wrapper, Field_real, Field_new_decimal, Field_tiny, Field_short, Field_medium, Field_long, Field_longlong, Field_null, Field_temporal, Field_blob, Field_bit, and Field_str.
|
inlinevirtual |
This is a wrapper around pack_length() used by filesort() to determine how many bytes we need for packing "addon fields".
Reimplemented in Field_string, and Field_blob.
|
inlinevirtual |
Reimplemented in Field_blob.
|
inlinevirtual |
Reimplemented in Field_bit.
Reimplemented in Field_varstring, and Field_enum.
|
inline |
|
virtual |
Reimplemented in Field_typed_array, Field_varstring, and Field_bit.
uint Field::null_offset | ( | ) | const |
|
inline |
|
inlinevirtual |
Returns Item_result type of a field when it appears in numeric context such as: SELECT time_column + 1; SELECT SUM(time_column); Examples:
Reimplemented in Create_field_wrapper, Field_str, and Field_temporal.
|
inline |
|
delete |
|
virtual |
Whether this field can be used for index range scans when in the given keypart of the given index.
Reimplemented in Field_enum.
Pack the field into a format suitable for storage and transfer.
To implement packing functionality, only the virtual function should be overridden. The other functions are just convenience functions and hence should not be overridden.
The actual format is opaque and will vary between types of Field (it is meant to be unpacked by unpack(), but be aware that it is used among others in the replication log, so you cannot change it without incurring a format break.
max_length
characters.to | Pointer to memory area where representation of field should be put. |
from | Pointer to memory area where record representation of field is stored, typically field->field_ptr(). |
max_length | Available space in “to”, in bytes. pack() will not write more bytes than this; if the field is too short, the contents are not unpackable by unpack(). (It is nominally supposed to be a prefix of what would have been written with a full buffer, ie., the same as packing and then truncating the output, but not all Field classes follow this.) |
Reimplemented in Field_decimal, Field_tiny, Field_short, Field_long, Field_longlong, Field_timestamp, Field_datetime, Field_string, Field_varstring, Field_blob, Field_enum, Field_bit, and Field_real.
Write the field for the binary log in diff format.
This should only write the field if the diff format is smaller than the full format. Otherwise it should leave the buffer untouched.
[in,out] | to | Pointer to buffer where the field will be written. This will be changed to point to the next byte after the last byte that was written. |
value_options | bitmap that indicates if full or partial JSON format is to be used. |
true | The field was not written, either because the data type does not support it, or because it was disabled according to value_options, or because there was no diff information available from the optimizer, or because the the diff format was bigger than the full format. The 'to' parameter is unchanged in this case. |
false | The field was written. |
Reimplemented in Field_json.
|
inlinevirtual |
Reimplemented in Create_field_wrapper, Field_new_decimal, Field_tiny, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_null, Field_timestamp, Field_timestampf, Field_newdate, Field_time, Field_timef, Field_datetime, Field_datetimef, Field_varstring, Field_blob, Field_enum, and Field_bit.
|
inlinevirtual |
Reimplemented in Field_new_decimal, Field_timestampf, Field_timef, Field_datetimef, Field_string, Field_enum, Field_bit, Field_num, and Field_typed_array.
|
inlinevirtual |
This function does the same thing as pack(), except for the difference that max_length does not mean the number of bytes in the output, but the maximum field length from the input (which must be exactly field->max_field_length()).
The difference is currently only relevant for Field_blob, but can be summed up as follows:
Reimplemented in Field_blob.
|
inlinevirtual |
Reimplemented in Field_timestampf, Field_newdate, Field_timef, Field_datetimef, Field_string, Field_varstring, Field_vector, Field_set, Field_typed_array, and Field_enum.
|
inlinevirtual |
Reimplemented in Field_num, Field_str, and Field_temporal.
|
inlinevirtual |
Reimplemented in Field_new_decimal, Field_null, Field_timef, Field_datetimef, Field_string, Field_geom, and Field_bit.
|
inline |
Reset temporary NULL value for field.
|
inline |
Turn off temporary nullability for the field.
|
inline |
|
static |
Detect Item_result by given field type of UNION merge result.
field_type | given field type |
|
pure virtual |
Implemented in Create_field_wrapper, Field_new_decimal, Field_tiny, Field_short, Field_medium, Field_long, Field_longlong, Field_temporal, Field_bit, Field_num, Field_str, and Field_typed_array.
|
inlinevirtual |
Reimplemented in Field_num, Field_temporal_with_date_and_timef, Field_timef, Field_string, Field_varstring, Field_blob, Field_enum, and Field_bit.
|
inline |
|
virtual |
Send the value of this field over the protocol using the correct Protocol::store*() function which matches the type of the field.
Reimplemented in Field_new_decimal, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_year, Field_newdate, Field_time_common, Field_tiny, and Field_temporal_with_date.
|
inline |
Remember the value of THD::check_for_truncated_fields to handle possible NOT-NULL constraint errors after BEFORE-trigger execution is finished.
We should save the value of THD::check_for_truncated_fields before starting BEFORE-trigger processing since during triggers execution the value of THD::check_for_truncated_fields could be changed.
|
inline |
|
virtual |
Reimplemented in Field_bit.
|
inlinevirtual |
Reimplemented in Field_str.
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
Sets the hidden type for this field.
hidden | the new hidden type to set. |
|
inlinevirtual |
Reimplemented in Field_bit.
|
inlinevirtual |
Reimplemented in Field_varstring, Field_blob, and Field_bit.
void Field::set_notnull | ( | ptrdiff_t | row_offset = 0 | ) |
Set field to value NOT NULL.
row_offset | This is the offset between the row being updated and table->record[0] |
void Field::set_null | ( | ptrdiff_t | row_offset = 0 | ) |
Set field to value NULL.
row_offset | This is the offset between the row being updated and table->record[0] |
|
inline |
|
inline |
void Field::set_tmp_null | ( | ) |
Set field to temporary value NULL.
|
inline |
Turn on temporary nullability for the field.
bool Field::set_warning | ( | Sql_condition::enum_severity_level | level, |
uint | code, | ||
int | truncate_increment, | ||
const char * | view_db_name, | ||
const char * | view_name | ||
) |
Produce warning or note about data saved into field.
level | - level of message (Note/Warning/Error) |
code | - error code of message to be produced |
truncate_increment | - whether we should increase truncated fields count |
view_db_name | - if set this is the database name for view that causes the warning |
view_name | - if set this is the name of view that causes the warning |
if check_for_truncated_fields == CHECK_FIELD_IGNORE then we ignore notes. This allows us to avoid notes in optimisation, like convert_constant_item().
In case of execution statements INSERT/INSERT SELECT/REPLACE/REPLACE SELECT the method emits only one warning message for the following types of warning: ER_BAD_NULL_ERROR, ER_WARN_NULL_TO_NOTNULL, ER_NO_DEFAULT_FOR_FIELD.
1 | if check_for_truncated_fields == CHECK_FIELD_IGNORE and error level is not NOTE |
0 | otherwise |
|
inline |
Produce warning or note about data saved into field.
level | - level of message (Note/Warning/Error) |
code | - error code of message to be produced |
cut_increment | - whenever we should increase cut fields count |
if check_for_truncated_fields == CHECK_FIELD_IGNORE then we ignore notes. This allows us to avoid notes in optimization, like convert_constant_item().
1 | if check_for_truncated_fields == CHECK_FIELD_IGNORE and error level is not NOTE |
0 | otherwise |
|
inlinevirtual |
Reimplemented in Field_temporal_with_date_and_timef, Field_timef, Field_json, and Field_enum.
|
pure virtual |
Implemented in Create_field_wrapper, Field_vector, Field_decimal, Field_new_decimal, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_null, Field_timestamp, Field_timestampf, Field_year, Field_newdate, Field_time, Field_timef, Field_datetime, Field_datetimef, Field_string, Field_varstring, Field_geom, Field_typed_array, Field_set, Field_bit_as_char, Field_tiny, Field_blob, Field_json, Field_enum, and Field_bit.
|
pure virtual |
Implemented in Create_field_wrapper, Field_null, Field_vector, Field_geom, Field_temporal, Field_decimal, Field_new_decimal, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_year, Field_string, Field_set, Field_bit_as_char, Field_tiny, Field_varstring, Field_blob, Field_vector, Field_geom, Field_json, Field_typed_array, Field_enum, Field_bit, Field_bit_as_char, and Field_str.
type_conversion_status Field::store | ( | const char * | to, |
size_t | length, | ||
const CHARSET_INFO * | cs, | ||
enum_check_fields | check_level | ||
) |
|
pure virtual |
Implemented in Field_decimal, Field_new_decimal, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_temporal, Field_year, Field_vector, Field_geom, Field_set, Field_bit, Field_bit_as_char, Field_str, Field_tiny, Field_blob, Field_vector, Field_geom, Field_json, Field_typed_array, Field_enum, Create_field_wrapper, and Field_null.
|
pure virtual |
Implemented in Field_decimal, Field_new_decimal, Field_short, Field_medium, Field_float, Field_double, Field_year, Field_datetime, Field_string, Field_varstring, Field_vector, Field_geom, Field_set, Field_bit, Field_bit_as_char, Field_tiny, Field_long, Field_longlong, Field_temporal, Field_blob, Field_vector, Field_geom, Field_json, Field_typed_array, Field_enum, Field_str, Create_field_wrapper, and Field_null.
|
pure virtual |
Implemented in Create_field_wrapper, Field_real, Field_new_decimal, Field_null, Field_vector, Field_geom, Field_json, Field_bit, Field_num, Field_str, Field_longstr, and Field_temporal.
|
inlinevirtual |
Store a temporal value in packed longlong format into a field.
The packed value is compatible with TIME_to_longlong_time_packed(), TIME_to_longlong_date_packed() or TIME_to_longlong_datetime_packed(). Note, the value must be properly rounded or truncated according according to field->decimals().
nr | temporal value in packed longlong format. |
false | on success |
true | on error |
Reimplemented in Field_timestamp, Field_timestampf, Field_newdate, Field_time, Field_timef, Field_datetime, and Field_datetimef.
|
inline |
Store MYSQL_TYPE value into a field when the number of fractional digits is not important or is not know.
ltime | Time, date or datetime value. |
false | on success |
true | on error |
|
virtual |
Store MYSQL_TIME value with the given amount of decimal digits into a field.
This is called when storing a date in a string.
Note, the "dec" parameter represents number of digits of the Item that previously created the MYSQL_TIME value. It's needed when we store the value into a CHAR/VARCHAR/TEXT field to display the proper amount of fractional digits. For other field types the "dec" value does not matter and is ignored.
ltime | Time, date or datetime value. |
dec_arg | Number of decimals in ltime. |
false | on success |
true | on error |
Reimplemented in Field_real, Field_new_decimal, Field_temporal_with_date, Field_year, Field_time_common, Field_num, and Field_json.
|
inlinevirtual |
Stores a timestamp value in timeval format in a field.
Since this interface relies on the caller to truncate the value according to this Field's scale, it will work with all constructs that we currently allow.
Reimplemented in Field_temporal_with_date_and_time.
|
inlinevirtual |
Reimplemented in Field_str, Field_temporal, and Field_bit.
|
pure virtual |
Implemented in Create_field_wrapper, Field_decimal, Field_new_decimal, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_null, Field_timestamp, Field_timestampf, Field_year, Field_newdate, Field_time, Field_timef, Field_datetime, Field_datetimef, Field_string, Field_varstring, Field_vector, Field_geom, Field_enum, Field_bit, Field_tiny, Field_blob, Field_json, and Field_typed_array.
|
static |
Check whether a field type can be partially indexed by a key.
This is a static method, rather than a virtual function, because we need to check the type of a non-Field in mysql_alter_table().
type | field type |
true | Type can have a prefixed key |
false | Type can not have a prefixed key |
Unpack a field from row data.
This method is used to unpack a field from a master whose size of the field is less than that of the slave.
The param_data
parameter is a two-byte integer (stored in the least significant 16 bits of the unsigned integer) usually consisting of two parts: the real type in the most significant byte and a original pack length in the least significant byte.
The exact layout of the param_data
field is given by the Table_map_log_event::save_field_metadata()
.
This is the default method for unpacking a field. It just copies the memory block in byte order (of original pack length bytes or length of field, whichever is smaller).
to | Destination of the data |
from | Source of the data |
param_data | Real type and original pack length of the field data |
Reimplemented in Field_blob, Field_decimal, Field_new_decimal, Field_tiny, Field_short, Field_long, Field_longlong, Field_timestamp, Field_datetime, Field_string, Field_varstring, Field_enum, Field_bit, and Field_real.
|
inlinevirtual |
Returns DATE/DATETIME value in packed longlong format.
This method should not be called for non-temporal types. Temporal field types override the default method.
Reimplemented in Field_newdate, Field_time_common, Field_datetimef, and Field_temporal_with_date.
|
inlinevirtual |
Reimplemented in Field_temporal_with_date.
|
pure virtual |
|
pure virtual |
Implemented in Field_decimal, Field_new_decimal, Field_short, Field_medium, Field_long, Field_float, Field_double, Field_null, Field_temporal_with_date_and_timef, Field_timestamp, Field_year, Field_newdate, Field_time, Field_timef, Field_datetime, Field_string, Field_varstring, Field_json, Field_enum, Field_bit, Field_tiny, Field_longlong, Field_blob, and Create_field_wrapper.
Interpret field value as an integer but return the result as a string.
This is used for printing bit_fields as numbers while debugging.
|
inline |
|
pure virtual |
Implemented in Field_decimal, Field_new_decimal, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_null, Field_temporal_with_date_and_timef, Field_year, Field_timef, Field_string, Field_varstring, Field_json, Field_enum, Field_bit, Field_tiny, Field_temporal, Field_blob, and Create_field_wrapper.
Implemented in Create_field_wrapper, Field_decimal, Field_new_decimal, Field_short, Field_medium, Field_long, Field_longlong, Field_float, Field_double, Field_year, Field_newdate, Field_time_common, Field_datetime, Field_string, Field_set, Field_bit, Field_tiny, Field_temporal_with_date, Field_varstring, Field_blob, Field_vector, Field_enum, Field_null, and Field_json.
|
inline |
Returns "native" packed longlong representation of a TIME or DATE/DATETIME field depending on field type.
|
inlinevirtual |
Returns TIME value in packed longlong format.
This method should not be called for non-temporal types. Temporal field types override the default method.
Reimplemented in Field_newdate, Field_time, Field_timef, and Field_temporal_with_date.
|
inlinevirtual |
Reimplemented in Field_temporal_with_date.
|
inlinevirtual |
Reimplemented in Field_timestamp, Field_timestampf, and Field_temporal_with_date.
bool Field::warn_if_overflow | ( | int | op_result | ) |
Process decimal library return codes and issue warnings for overflow and truncation.
op_result | decimal library return code (E_DEC_* see include/decimal.h) |
0 | No error or some other errors except overflow |
1 | There was overflow |
|
inlinevirtual |
Reimplemented in Field_decimal, Field_new_decimal, Field_timestamp, Field_timestampf, Field_newdate, Field_time, Field_timef, Field_datetime, Field_datetimef, Field_string, Field_varstring, Field_set, and Field_enum.
uchar Field::auto_flags |
Bitmap of flags indicating if field value is auto-generated by default and/or on update, and in which way.
LEX_CSTRING Field::comment |
|
staticprotected |
uint32 Field::field_length |
const char * Field::field_name |
|
private |
Value_generator* Field::gcol_info {nullptr} |
bool Field::is_created_from_null_item |
If true, this field was created in create_tmp_field_from_item from a NULL value.
This means that the type of the field is just a guess, and the type may be freely coerced to another type.
Key_map Field::key_start |
|
private |
The value of THD::check_for_truncated_fields at the moment of setting m_is_tmp_null attribute.
Value_generator* Field::m_default_val_expr {nullptr} |
Holds the expression to be used to generate default values.
LEX_CSTRING Field::m_engine_attribute = EMPTY_CSTR |
|
private |
|
private |
bool Field::m_indexed |
True if this field belongs to some index (unlike part_of_key, the index might have only a prefix).
|
private |
This is a flag with the following semantics:
This flag is used for trigger handling.
|
private |
Flag: if the NOT-NULL field can be temporary NULL.
|
private |
Byte where the NULL
bit is stored inside a record.
If this Field is a NOT
NULL
field, this member is NULL
.
LEX_CSTRING Field::m_secondary_engine_attribute = EMPTY_CSTR |
|
private |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
uchar Field::null_bit |
const char* Field::orig_db_name {nullptr} |
Pointer to original database name, only non-NULL for a temporary table.
const char* Field::orig_table_name {nullptr} |
Pointer to original table name, only non-NULL for a temporary table.
Key_map Field::part_of_key |
Keys that includes this field except of prefix keys.
Key_map Field::part_of_key_not_extended |
All keys that include this field, but not extended by the storage engine to include primary key columns.
Key_map Field::part_of_prefixkey |
Prefix keys.
Key_map Field::part_of_sortkey |
|
protected |
Holds the position to the field in record.
bool Field::stored_in_db |
Indication that the field is physically stored in tables rather than just generated on SQL queries.
As of now, false can only be set for virtual generated columns.
TABLE* Field::table |
Pointer to TABLE object that owns this field.
const char** Field::table_name |