#At file:///home/dlenev/src/bzr/mysql-6.1-fk-mrg/
2686 Dmitry Lenev 2008-10-18
Got rid of extra shift/reduce conflicts and warnings about unused
grammar rules which occured after merging recent changes from
mysql-6.0 tree into tree for WL#148 "Foreign keys".
modified:
sql/sql_yacc.yy
per-file messages:
sql/sql_yacc.yy
Got rid of extra shift/reduce conflicts which were caused by the
fact that it was allowed to omit constraint identifier in DROP
CONSTRAINT clause of ALTER TABLE (the conflict occured because
for such grammar it is impossible to distinguish if REMOVE and
PARTITION words following CONSTRAINT keyword are part of next
clause of ALTER TABLE or a constraint name). Since omitting
constraint name in this situation is non-standard and does not
make any sense we simply change grammar to disallow it.
Also removed opt_check_constraint rule which is no longer
used.
=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy 2008-10-10 08:21:42 +0000
+++ b/sql/sql_yacc.yy 2008-10-17 20:05:34 +0000
@@ -4945,11 +4945,6 @@ key_def:
}
;
-opt_check_constraint:
- /* empty */
- | check_constraint
- ;
-
check_constraint:
CHECK_SYM '(' expr ')'
;
@@ -6250,12 +6245,12 @@ alter_list_item:
lex->alter_info.drop_list.push_back(ad);
lex->alter_info.flags|= ALTER_DROP_COLUMN;
}
- | DROP constraint
+ | DROP CONSTRAINT field_ident
{
THD *thd= YYTHD;
LEX *lex= thd->lex;
Alter_drop *alter_drop=
- new (thd->mem_root) Alter_drop(Alter_drop::FOREIGN_KEY, $2.str);
+ new (thd->mem_root) Alter_drop(Alter_drop::FOREIGN_KEY, $3.str);
if (alter_drop == NULL)
MYSQL_YYABORT;
lex->alter_info.drop_list.push_back(alter_drop);
| Thread |
|---|
| • bzr commit into mysql-6.1-fk branch (dlenev:2686) WL#148 | Dmitry Lenev | 17 Oct |