24#ifndef SQL_CONSTRAINT_INCLUDED
25#define SQL_CONSTRAINT_INCLUDED
Class representing ALTER CHECK and ALTER CONSTRAINT clauses in ALTER TABLE statement.
Definition: sql_alter.h:183
Class representing DROP COLUMN, DROP KEY, DROP FOREIGN KEY, DROP CHECK CONSTRAINT and DROP CONSTRAINT...
Definition: sql_alter.h:64
Data describing the table being created by CREATE TABLE or altered by ALTER TABLE.
Definition: sql_alter.h:204
Base class to resolve constraints type for the constraints specified in the ALTER TABLE ....
Definition: sql_constraint.h:50
Alter_info * m_alter_info
Alter_info instance describing table being altered.
Definition: sql_constraint.h:117
virtual bool is_type_resolution_needed() const =0
Method to check if constraint type resolution is needed.
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.
Definition: sql_constraint.cc:35
bool is_referential_constraint(const dd::Table *dd_src_table, const char *name)
Helper method to check if "name" type is REFERENTIAL constraint.
Definition: sql_constraint.cc:49
Constraint_type_resolver(Alter_info *alter_info)
Definition: sql_constraint.h:52
virtual ~Constraint_type_resolver()=default
bool is_check_constraint(const TABLE *src_table, const char *name)
Helper method to check if "name" type is CHECK constraint.
Definition: sql_constraint.cc:61
virtual bool resolve_constraints_type(THD *thd, const TABLE *src_table, const dd::Table *dd_src_table)=0
Method to resolve constraints type.
Class to resolve constraints type for the constraints specified in the ALTER TABLE ....
Definition: sql_constraint.h:132
Drop_constraint_type_resolver(Alter_info *alter_info)
Definition: sql_constraint.h:134
bool is_type_resolution_needed() const override
Method to check if constraint type resolution is needed.
Definition: sql_constraint.cc:86
~Drop_constraint_type_resolver() override
Definition: sql_constraint.cc:74
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.
Definition: sql_constraint.cc:90
uint m_first_fixed_alter_drop_pos
Definition: sql_constraint.h:187
bool resolve_constraints_type(THD *thd, const TABLE *src_table, const dd::Table *dd_src_table) override
Method to resolve constraints type.
Definition: sql_constraint.cc:157
ulonglong m_flags
Flags set in Alter_info::flags while fixing type for constraint.
Definition: sql_constraint.h:180
Class to resolve constraints type for the constraints specified in the ALTER TABLE ....
Definition: sql_constraint.h:202
~Enforce_constraint_type_resolver() override
Definition: sql_constraint.cc:173
Enforce_constraint_type_resolver(Alter_info *alter_info)
Definition: sql_constraint.h:204
bool resolve_constraint_type(THD *thd, const TABLE *src_table, const dd::Table *dd_src_table, const Alter_constraint_enforcement *alter_constraint)
Method to resolve constraint type.
Definition: sql_constraint.cc:194
bool is_type_resolution_needed() const override
Method to check if constraint type resolution is needed.
Definition: sql_constraint.cc:189
ulonglong m_flags
Flags set in Alter_info::flags while fixing type for check constraint.
Definition: sql_constraint.h:251
bool resolve_constraints_type(THD *thd, const TABLE *src_table, const dd::Table *dd_src_table) override
Method to resolve constraints type.
Definition: sql_constraint.cc:242
uint m_first_fixed_alter_constraint_pos
Definition: sql_constraint.h:259
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
bool drop(THD *thd, const Table *tp)
Remove SDI for a table.
Definition: sdi.cc:639
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
case opt name
Definition: sslopt-case.h:33
unsigned int uint
Definition: uca9-dump.cc:75