#include <key_spec.h>
|
| Foreign_key_spec (MEM_ROOT *mem_root, const LEX_CSTRING &name_arg, List< Key_part_spec > cols, const LEX_CSTRING &ref_db_arg, const LEX_CSTRING &orig_ref_db_arg, const LEX_CSTRING &ref_table_arg, const LEX_CSTRING &orig_ref_table_arg, List< Key_part_spec > *ref_cols, fk_option delete_opt_arg, fk_option update_opt_arg, fk_match_opt match_opt_arg) |
|
bool | validate (THD *thd, const char *table_name, List< Create_field > &table_fields) const |
| Check if the foreign key name has valid length and its options are compatible with columns on which the FK is created. More...
|
|
| Key_spec (MEM_ROOT *mem_root, keytype type_par, const LEX_CSTRING &name_arg, const KEY_CREATE_INFO *key_info_arg, bool generated_arg, bool check_for_duplicate_indexes_arg, List< Key_part_spec > &cols) |
|
virtual | ~Key_spec ()=default |
|
◆ Foreign_key_spec()
Foreign_key_spec::Foreign_key_spec |
( |
MEM_ROOT * |
mem_root, |
|
|
const LEX_CSTRING & |
name_arg, |
|
|
List< Key_part_spec > |
cols, |
|
|
const LEX_CSTRING & |
ref_db_arg, |
|
|
const LEX_CSTRING & |
orig_ref_db_arg, |
|
|
const LEX_CSTRING & |
ref_table_arg, |
|
|
const LEX_CSTRING & |
orig_ref_table_arg, |
|
|
List< Key_part_spec > * |
ref_cols, |
|
|
fk_option |
delete_opt_arg, |
|
|
fk_option |
update_opt_arg, |
|
|
fk_match_opt |
match_opt_arg |
|
) |
| |
|
inline |
◆ validate()
bool Foreign_key_spec::validate |
( |
THD * |
thd, |
|
|
const char * |
table_name, |
|
|
List< Create_field > & |
table_fields |
|
) |
| const |
Check if the foreign key name has valid length and its options are compatible with columns on which the FK is created.
- Parameters
-
thd | Thread handle |
table_name | Table name (for error reporting) |
table_fields | List of columns |
- Return values
-
false | Key valid |
true | Key invalid |
◆ delete_opt
◆ has_explicit_name
const bool Foreign_key_spec::has_explicit_name |
Indicates whether foreign key name was provided explicitly or was generated automatically.
- See also
- prepare_foreign_key().
◆ match_opt
◆ orig_ref_db
◆ orig_ref_table
◆ ref_columns
◆ ref_db
◆ ref_table
◆ update_opt
The documentation for this class was generated from the following files: