MySQL 9.1.0
Source Code Documentation
|
Class to resolve constraints type for the constraints specified in the ALTER TABLE ... DROP CONSTRAINT operation. More...
#include <sql_constraint.h>
Public Member Functions | |
Drop_constraint_type_resolver (Alter_info *alter_info) | |
~Drop_constraint_type_resolver () override | |
bool | is_type_resolution_needed () const override |
Method to check if constraint type resolution is needed. More... | |
bool | resolve_constraints_type (THD *thd, const TABLE *src_table, const dd::Table *dd_src_table) override |
Method to resolve constraints type. More... | |
Public Member Functions inherited from Constraint_type_resolver | |
Constraint_type_resolver (Alter_info *alter_info) | |
virtual | ~Constraint_type_resolver ()=default |
Private Member Functions | |
bool | resolve_constraint_type (THD *thd, const TABLE *src_table, const dd::Table *dd_src_table, const Alter_drop *drop) |
Method to resolve constraint type. More... | |
Private Attributes | |
ulonglong | m_flags {0} |
Flags set in Alter_info::flags while fixing type for constraint. More... | |
uint | m_first_fixed_alter_drop_pos {0} |
Additional Inherited Members | |
Protected Member Functions inherited from Constraint_type_resolver | |
KEY * | is_primary_or_unique_constraint (const TABLE *src_table, const char *name) |
Helper method to check if "name" type is PRIMARY or UNIQUE constraint. More... | |
bool | is_referential_constraint (const dd::Table *dd_src_table, const char *name) |
Helper method to check if "name" type is REFERENTIAL constraint. More... | |
bool | is_check_constraint (const TABLE *src_table, const char *name) |
Helper method to check if "name" type is CHECK constraint. More... | |
Protected Attributes inherited from Constraint_type_resolver | |
Alter_info * | m_alter_info |
Alter_info instance describing table being altered. More... | |
Class to resolve constraints type for the constraints specified in the ALTER TABLE ... DROP CONSTRAINT operation.
For a constraint specified in the DROP CONSTRAINT operations of a ALTER TABLE statement, actual constraint type is unknown. This is the class to resolve actual constraint type (PRIMARY, UNIQUE, FOREIGN KEY or CHECK) by constraint name. Alter_drop elements with actual constraint type are added to the Alter_info::Alter_drop list. To make changes safe for re-execution of a stored routines and prepared statements, elements added to Alter_drop list are removed in the destructor.
|
inlineexplicit |
|
override |
|
overridevirtual |
Method to check if constraint type resolution is needed.
true | if ALTER TABLE statement has DROP CONSTRAINT operations. |
false | Otherwise. |
Implements Constraint_type_resolver.
|
private |
Method to resolve constraint type.
thd | Thread handle. |
src_table | TABLE instance of a source table. |
dd_src_table | Data-dictionary table instance of a source table. |
drop | Alter_drop instance for which type should be resolved. |
false | Success. |
true | Failure. |
|
overridevirtual |
Method to resolve constraints type.
thd | Thread handle. |
src_table | TABLE instance of a source table. |
dd_src_table | Data-dictionary table instance of a source table. |
false | Success. |
true | Failure. |
Implements Constraint_type_resolver.
|
private |
|
private |
Flags set in Alter_info::flags while fixing type for constraint.