MySQL 9.2.0
Source Code Documentation
dict_foreign_t Struct Reference

Data structure for a foreign key constraint; an example: FOREIGN KEY (A, B) REFERENCES TABLE2 (C, D). More...

#include <dict0mem.h>

Public Member Functions

bool is_fts_col_affected () const
 Check whether foreign key constraint contains a column with a full index on it. More...
 

Public Attributes

mem_heap_theap
 this object is allocated from this memory heap More...
 
char * id
 id of the constraint as a null-terminated string More...
 
unsigned n_fields: 10
 number of indexes' first fields for which the foreign key constraint is defined: we allow the indexes to contain more fields than mentioned in the constraint, as long as the first fields are as mentioned More...
 
unsigned type: 6
 0 or DICT_FOREIGN_ON_DELETE_CASCADE or DICT_FOREIGN_ON_DELETE_SET_NULL More...
 
char * foreign_table_name
 foreign table name More...
 
char * foreign_table_name_lookup
 foreign table name used for dict lookup More...
 
dict_table_tforeign_table
 table where the foreign key is More...
 
const char ** foreign_col_names
 names of the columns in the foreign key More...
 
char * referenced_table_name
 referenced table name More...
 
char * referenced_table_name_lookup
 referenced table name for dict lookup More...
 
dict_table_treferenced_table
 table where the referenced key is More...
 
const char ** referenced_col_names
 names of the referenced columns in the referenced table More...
 
dict_index_tforeign_index
 foreign index; we require that both tables contain explicitly defined indexes for the constraint: InnoDB does not generate new indexes implicitly More...
 
dict_index_treferenced_index
 referenced index More...
 
dict_vcol_setv_cols
 set of virtual columns affected by foreign key constraint. More...
 

Detailed Description

Data structure for a foreign key constraint; an example: FOREIGN KEY (A, B) REFERENCES TABLE2 (C, D).

Most fields will be initialized to 0, NULL or false in dict_mem_foreign_create().

Member Function Documentation

◆ is_fts_col_affected()

bool dict_foreign_t::is_fts_col_affected ( ) const

Check whether foreign key constraint contains a column with a full index on it.

The function is used in the context of cascading DML operations.

Return values
trueif the column has FTS index on it.
falseif the FK table has no FTS index or has self referential relationship

Member Data Documentation

◆ foreign_col_names

const char** dict_foreign_t::foreign_col_names

names of the columns in the foreign key

◆ foreign_index

dict_index_t* dict_foreign_t::foreign_index

foreign index; we require that both tables contain explicitly defined indexes for the constraint: InnoDB does not generate new indexes implicitly

◆ foreign_table

dict_table_t* dict_foreign_t::foreign_table

table where the foreign key is

◆ foreign_table_name

char* dict_foreign_t::foreign_table_name

foreign table name

◆ foreign_table_name_lookup

char* dict_foreign_t::foreign_table_name_lookup

foreign table name used for dict lookup

◆ heap

mem_heap_t* dict_foreign_t::heap

this object is allocated from this memory heap

◆ id

char* dict_foreign_t::id

id of the constraint as a null-terminated string

◆ n_fields

unsigned dict_foreign_t::n_fields

number of indexes' first fields for which the foreign key constraint is defined: we allow the indexes to contain more fields than mentioned in the constraint, as long as the first fields are as mentioned

◆ referenced_col_names

const char** dict_foreign_t::referenced_col_names

names of the referenced columns in the referenced table

◆ referenced_index

dict_index_t* dict_foreign_t::referenced_index

referenced index

◆ referenced_table

dict_table_t* dict_foreign_t::referenced_table

table where the referenced key is

◆ referenced_table_name

char* dict_foreign_t::referenced_table_name

referenced table name

◆ referenced_table_name_lookup

char* dict_foreign_t::referenced_table_name_lookup

referenced table name for dict lookup

◆ type

unsigned dict_foreign_t::type

0 or DICT_FOREIGN_ON_DELETE_CASCADE or DICT_FOREIGN_ON_DELETE_SET_NULL

◆ v_cols

dict_vcol_set* dict_foreign_t::v_cols

set of virtual columns affected by foreign key constraint.


The documentation for this struct was generated from the following files: