MySQL 9.6.0
Source Code Documentation
sql_foreign_key_constraint.h File Reference

Go to the source code of this file.

Enumerations

enum class  enum_fk_dml_type { FK_INSERT , FK_UPDATE , FK_DELETE , FK_DELETE_REPLACE }
 

Functions

bool is_foreign_key_table_opened (THD *thd, const char *db_name, const char *table_name, const char *fk_name)
 Check if TABLE instance for foreign key is already opened. More...
 
bool check_all_parent_fk_ref (THD *thd, const TABLE *table_c, enum_fk_dml_type dml_type)
 Check all foreign key constraints on parent tables for DML operation on a child table. More...
 
bool check_all_child_fk_ref (THD *thd, const TABLE *table_p, enum_fk_dml_type dml_type)
 Check all foreign key constraints on child tables for DML operation on a parent table. More...
 

Enumeration Type Documentation

◆ enum_fk_dml_type

enum class enum_fk_dml_type
strong
Enumerator
FK_INSERT 
FK_UPDATE 
FK_DELETE 
FK_DELETE_REPLACE 

Function Documentation

◆ check_all_child_fk_ref()

bool check_all_child_fk_ref ( THD thd,
const TABLE table_p,
enum_fk_dml_type  dml_type 
)

Check all foreign key constraints on child tables for DML operation on a parent table.

Parameters
thdThread handle.
table_pTABLE instance of a parent table.
dml_typeDML operation type.
Returns
true On error.
false On Success.

◆ check_all_parent_fk_ref()

bool check_all_parent_fk_ref ( THD thd,
const TABLE table_c,
enum_fk_dml_type  dml_type 
)

Check all foreign key constraints on parent tables for DML operation on a child table.

Parameters
thdThread handle.
table_cTABLE instance of a child table.
dml_typeDML operation type.
Returns
true On error.
false On Success.

◆ is_foreign_key_table_opened()

bool is_foreign_key_table_opened ( THD thd,
const char *  db_name,
const char *  table_name,
const char *  fk_name 
)

Check if TABLE instance for foreign key is already opened.

Parameters
thdThread handle.
db_nameDB name.
table_nameTable name.
fk_nameForeign key name.
Returns
true If table for foreign key is already opened.
false If table is not opened.