![]() |
MySQL 9.7.0
Source Code Documentation
|
Helper class to check if an ALTER statement performs a disallowed modification on a column depended on by a Check constraint. More...
#include <sql_check_constraint.h>
Public Member Functions | |
| Check_constraint_column_dependency_checker (const Sql_check_constraint_spec_list &check_constraint_list) | |
| bool | operator() (const Alter_drop *drop) |
| Method to check if column being dropped is in use by check constraints. More... | |
| bool | operator() (const Alter_column *alter_column) |
| Method to check if a column being altered with the RENAME COLUMN or SET MASKING POLICY clause of the ALTER TABLE statement is in use by check constraints. More... | |
| bool | operator() (const Create_field &fld) |
| Method to check if the CHANGE COLUMN or MODIFY COLUMN clause of the ALTER TABLE statement renames a column or assigns a masking policy to a column which is in use by check constraints. More... | |
Private Types | |
| enum class | Operation { kDropColumn , kRenameColumn , kSetMaskingPolicy } |
Private Member Functions | |
| bool | any_check_constraint_uses_column (const char *column_name, Operation operation) |
| Check if any check constraint uses "column_name". More... | |
Private Attributes | |
| const Sql_check_constraint_spec_list & | m_check_constraint_list |
| Check constraint specification list. More... | |
Helper class to check if an ALTER statement performs a disallowed modification on a column depended on by a Check constraint.
Disallowed modifications include:
|
strongprivate |
|
inlineexplicit |
|
private |
Check if any check constraint uses "column_name".
| column_name | Column name. |
| operation | Which operation is performed on the column. |
| true | If column is used by the check constraint. |
| false | Otherwise. |
| bool Check_constraint_column_dependency_checker::operator() | ( | const Alter_column * | alter_column | ) |
Method to check if a column being altered with the RENAME COLUMN or SET MASKING POLICY clause of the ALTER TABLE statement is in use by check constraints.
| alter_column | Instance of Alter_column. |
| true | If some check constraint uses the column being renamed. |
| false | Otherwise. |
| bool Check_constraint_column_dependency_checker::operator() | ( | const Alter_drop * | drop | ) |
Method to check if column being dropped is in use by check constraints.
| drop | Instance of Alter_drop. |
| true | If some check constraint uses the column being dropped. |
| false | Otherwise. |
| bool Check_constraint_column_dependency_checker::operator() | ( | const Create_field & | fld | ) |
Method to check if the CHANGE COLUMN or MODIFY COLUMN clause of the ALTER TABLE statement renames a column or assigns a masking policy to a column which is in use by check constraints.
| fld | Instance of Create_field. |
| true | If some check constraint uses the column being renamed. |
| false | Otherwise. |
|
private |
Check constraint specification list.