MySQL 8.0.39
Source Code Documentation
|
Go to the source code of this file.
Classes | |
class | Sql_check_constraint_spec |
Class to represent the check constraint specifications obtained from the SQL statement parse. More... | |
class | Sql_check_constraint_share |
Class to represent check constraint in the TABLE_SHARE. More... | |
class | Sql_table_check_constraint |
Class to represent check constraint in the TABLE instance. More... | |
class | Check_constraint_column_dependency_checker |
Helper class to check if column being dropped or removed in ALTER statement is in use by Check constraints. More... | |
Typedefs | |
using | Sql_check_constraint_spec_list = Mem_root_array< Sql_check_constraint_spec * > |
Type for the list of Sql_check_constraint_spec elements. More... | |
using | Sql_check_constraint_share_list = Mem_root_array< Sql_check_constraint_share > |
Type for the list of Sql_check_constraint_share elements. More... | |
using | Sql_table_check_constraint_list = Mem_root_array< Sql_table_check_constraint > |
Type for the list of Sql_table_check_constraint elements. More... | |
Functions | |
bool | is_slave_with_master_without_check_constraints_support (THD *thd) |
Method to check if server is a slave server and master server is on a version not supporting check constraints feature. More... | |
bool | check_constraint_expr_refers_to_only_column (Item *check_expr, const char *column_name) |
Check if constraint expression refers to only "column_name" column of the table. More... | |
Type for the list of Sql_check_constraint_share elements.
Type for the list of Sql_check_constraint_spec elements.
Type for the list of Sql_table_check_constraint elements.
bool check_constraint_expr_refers_to_only_column | ( | Item * | check_expr, |
const char * | column_name | ||
) |
Check if constraint expression refers to only "column_name" column of the table.
[in] | check_expr | Check constraint expression. |
[in] | column_name | Column name. |
true | If expression refers to only "column_name". |
false | If expression refers to more than one column or if expression does not refers to "column_name". |
bool is_slave_with_master_without_check_constraints_support | ( | THD * | thd | ) |
Method to check if server is a slave server and master server is on a version not supporting check constraints feature.
Check constraint support is introduced in server version 80016.
Method is used by methods prepare_check_constraints_for_create() and prepare_check_constraints_for_alter(). Check constraints are not prepared (and specification list is cleared) when this method returns to true. In older versions, check constraint syntax was supported but check constraint feature was not supported. So if master is on older version and slave gets event with check constraint syntax then on slave supporting check constraint, query is parsed but during prepare time the specifications are ignored for the statement(event).
true | if server is a slave server and master server is on a version not supporting check constraints feature. |
false | Otherwise. |