diff options
author | Marc Alff <marc.alff@sun.com> | 2010-01-22 19:00:19 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2010-01-22 19:00:19 -0700 |
commit | 372611d7b5aab43a8e5304cbfe365ce8de72705f (patch) | |
tree | 230c9976245fd678f3c681a778f74c74c74dfef5 /sql/sql_yacc.yy | |
parent | 63ea7489a022437695b76e08eccc453b4a76f038 (diff) | |
download | mariadb-git-372611d7b5aab43a8e5304cbfe365ce8de72705f.tar.gz |
Bug#11714 Non-sensical ALTER TABLE ADD CONSTRAINT allowed
Bug#35578 Parser allows useless/illegal CREATE TABLE syntax
Bug#38696 CREATE TABLE ... CHECK ... allows illegal syntax
Backport from 6.0 to mysql-next-mr.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ab128a9b701..aebf80e340f 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -765,10 +765,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %pure_parser /* We have threads */ /* - Currently there are 172 shift/reduce conflicts. + Currently there are 169 shift/reduce conflicts. We should not introduce new conflicts any more. */ -%expect 172 +%expect 169 /* Comments for TOKENS. @@ -5282,10 +5282,6 @@ key_def: /* Only used for ALTER TABLE. Ignored otherwise. */ lex->alter_info.flags|= ALTER_FOREIGN_KEY; } - | constraint opt_check_constraint - { - Lex->col_list.empty(); /* Alloced by sql_alloc */ - } | opt_constraint check_constraint { Lex->col_list.empty(); /* Alloced by sql_alloc */ @@ -5298,7 +5294,7 @@ opt_check_constraint: ; check_constraint: - CHECK_SYM expr + CHECK_SYM '(' expr ')' ; opt_constraint: |