MySQL 8.0.39
Source Code Documentation
|
Used for storing information associated with generated column, default values generated from expression or check constraint expression. More...
#include <field.h>
Public Member Functions | |
enum_field_types | get_real_type () const |
void | set_field_type (enum_field_types fld_type) |
void | backup_stmt_unsafe_flags (uint32 backup_binlog_stmt_flags) |
Set the binary log flags in m_backup_binlog_stmt_flags. More... | |
uint32 | get_stmt_unsafe_flags () |
Get the binary log flags from m_backup_binlog_stmt_flags. More... | |
bool | get_field_stored () const |
void | set_field_stored (bool stored) |
bool | register_base_columns (TABLE *table) |
Calculate the base_columns_map and num_non_virtual_base_cols members of this generated column. More... | |
uint | non_virtual_base_columns () const |
Get the number of non virtual base columns that this generated column needs. More... | |
void | dup_expr_str (MEM_ROOT *root, const char *src, size_t len) |
Duplicates a string into expr_str. More... | |
void | print_expr (THD *thd, String *out) |
Writes the generation expression into a String with proper syntax. More... | |
Public Attributes | |
Item * | expr_item {nullptr} |
Item representing the generation expression. More... | |
LEX_STRING | expr_str {nullptr, 0} |
Text of the expression. More... | |
uint32 | m_backup_binlog_stmt_flags {0} |
Bit field indicating the type of statement for binary logging. More... | |
Item * | item_list {nullptr} |
List of all items created when parsing and resolving generated expression. More... | |
MY_BITMAP | base_columns_map |
Bitmap records base columns which a generated column depends on. More... | |
Private Attributes | |
enum_field_types | field_type {MYSQL_TYPE_INVALID} |
Real field type. More... | |
bool | stored_in_db {false} |
Indicates if the field is physically stored in the database. More... | |
uint | num_non_virtual_base_cols {0} |
How many non-virtual base columns in base_columns_map. More... | |
Used for storing information associated with generated column, default values generated from expression or check constraint expression.
|
inline |
Set the binary log flags in m_backup_binlog_stmt_flags.
backup_binlog_stmt_flags | the flags to be backed up |
void Value_generator::dup_expr_str | ( | MEM_ROOT * | root, |
const char * | src, | ||
size_t | len | ||
) |
Duplicates a string into expr_str.
root | MEM_ROOT to use for allocation |
src | source string |
len | length of 'src' in bytes |
|
inline |
|
inline |
|
inline |
Get the binary log flags from m_backup_binlog_stmt_flags.
|
inline |
Get the number of non virtual base columns that this generated column needs.
Writes the generation expression into a String with proper syntax.
thd | THD |
out | output String |
bool Value_generator::register_base_columns | ( | TABLE * | table | ) |
Calculate the base_columns_map and num_non_virtual_base_cols members of this generated column.
table | Table with the checked field |
true | if error |
|
inline |
|
inline |
MY_BITMAP Value_generator::base_columns_map |
Bitmap records base columns which a generated column depends on.
Item representing the generation expression.
This is non-NULL for every Field of a TABLE, if that field is a generated column. Contrast this with the Field of a TABLE_SHARE, which has expr_item==NULL even if it's a generated column; that makes sense, as an Item tree cannot be shared.
LEX_STRING Value_generator::expr_str {nullptr, 0} |
Text of the expression.
Used in only one case:
|
private |
Real field type.
List of all items created when parsing and resolving generated expression.
uint32 Value_generator::m_backup_binlog_stmt_flags {0} |
Bit field indicating the type of statement for binary logging.
It needs to be saved because this is determined only once when it is parsed but it needs to be set on the lex for each statement that uses this value generator. And since unpacking is done once on table open, it will be set for the rest of the statements in bind_value_generator_to_fields.
|
private |
How many non-virtual base columns in base_columns_map.
|
private |
Indicates if the field is physically stored in the database.