cleanup: use enum, not uint, for enum variables
This commit is contained in:
parent
d717fe76e1
commit
5282d0dce1
@ -362,11 +362,13 @@ public:
|
||||
LEX_CSTRING ref_db;
|
||||
LEX_CSTRING ref_table;
|
||||
List<Key_part_spec> ref_columns;
|
||||
uint delete_opt, update_opt, match_opt;
|
||||
enum enum_fk_option delete_opt, update_opt;
|
||||
enum fk_match_opt match_opt;
|
||||
Foreign_key(const LEX_CSTRING *name_arg, List<Key_part_spec> *cols,
|
||||
const LEX_CSTRING *ref_db_arg, const LEX_CSTRING *ref_table_arg,
|
||||
List<Key_part_spec> *ref_cols,
|
||||
uint delete_opt_arg, uint update_opt_arg, uint match_opt_arg,
|
||||
enum_fk_option delete_opt_arg, enum_fk_option update_opt_arg,
|
||||
fk_match_opt match_opt_arg,
|
||||
DDL_options ddl_options)
|
||||
:Key(FOREIGN_KEY, name_arg, &default_key_create_info, 0, cols, NULL,
|
||||
ddl_options),
|
||||
|
@ -1383,7 +1383,6 @@ innobase_set_foreign_key_option(
|
||||
ut_ad(!foreign->type);
|
||||
|
||||
switch (fk_key->delete_opt) {
|
||||
// JAN: TODO: ? MySQL 5.7 used enum fk_option directly from sql_lex.h
|
||||
case FK_OPTION_NO_ACTION:
|
||||
case FK_OPTION_RESTRICT:
|
||||
case FK_OPTION_SET_DEFAULT:
|
||||
@ -1395,6 +1394,8 @@ innobase_set_foreign_key_option(
|
||||
case FK_OPTION_SET_NULL:
|
||||
foreign->type = DICT_FOREIGN_ON_DELETE_SET_NULL;
|
||||
break;
|
||||
case FK_OPTION_UNDEF:
|
||||
DBUG_ASSERT(0);
|
||||
}
|
||||
|
||||
switch (fk_key->update_opt) {
|
||||
@ -1409,6 +1410,8 @@ innobase_set_foreign_key_option(
|
||||
case FK_OPTION_SET_NULL:
|
||||
foreign->type |= DICT_FOREIGN_ON_UPDATE_SET_NULL;
|
||||
break;
|
||||
case FK_OPTION_UNDEF:
|
||||
DBUG_ASSERT(0);
|
||||
}
|
||||
|
||||
return(innobase_check_fk_option(foreign));
|
||||
|
Loading…
x
Reference in New Issue
Block a user