diff options
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index be768d6e755..e48748bcfa5 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4168,6 +4168,9 @@ key_def: HA_KEY_ALG_UNDEF, 1, lex->col_list)); lex->col_list.empty(); /* Alloced by sql_alloc */ + + /* Only used for ALTER TABLE. Ignored otherwise. */ + lex->alter_info.flags|= ALTER_FOREIGN_KEY; } | constraint opt_check_constraint { @@ -5138,7 +5141,7 @@ alter_list_item: } | DROP FOREIGN KEY_SYM opt_ident { - Lex->alter_info.flags|= ALTER_DROP_INDEX; + Lex->alter_info.flags|= ALTER_DROP_INDEX | ALTER_FOREIGN_KEY; } | DROP PRIMARY_SYM KEY_SYM { |