diff options
author | unknown <antony@ltantony.dsl-verizon.net> | 2004-04-28 16:14:53 +0100 |
---|---|---|
committer | unknown <antony@ltantony.dsl-verizon.net> | 2004-04-28 16:14:53 +0100 |
commit | 0d07fe42c3a825e21d74f3db8efe4af1dba32f5b (patch) | |
tree | 6c92d4845efa916dd3e9c67a7bd1465826848af5 /sql | |
parent | d1214e2c5d17ca397588bbd1ed5de12c8396459f (diff) | |
download | mariadb-git-0d07fe42c3a825e21d74f3db8efe4af1dba32f5b.tar.gz |
Fix for Bug 3481
CREATE statement allowed extra unnecessary commas
mysql-test/r/alias.result:
Extra comma removed in CREATE statement
mysql-test/r/create.result:
New test for Bug 3481
mysql-test/r/func_str.result:
Extra comma removed in CREATE statement
mysql-test/r/rpl_multi_update.result:
Extra comma removed in CREATE statement
mysql-test/t/alias.test:
Extra comma removed in CREATE statement
mysql-test/t/create.test:
New test for bug 3481
mysql-test/t/func_str.test:
Extra comma removed in CREATE statement
mysql-test/t/rpl_multi_update.test:
Extra comma removed in CREATE statement
sql/sql_yacc.yy:
Fix for bug 3481
No path through the grammar which has no clauses
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_yacc.yy | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 52334b4830e..2930c60310a 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -945,7 +945,7 @@ field_list_item: ; column_def: - field_spec check_constraint + field_spec opt_check_constraint | field_spec references { Lex->col_list.empty(); /* Alloced by sql_alloc */ @@ -963,20 +963,31 @@ key_def: { Lex->col_list.empty(); /* Alloced by sql_alloc */ } + | constraint opt_check_constraint + { + Lex->col_list.empty(); /* Alloced by sql_alloc */ + } | opt_constraint check_constraint { Lex->col_list.empty(); /* Alloced by sql_alloc */ } ; -check_constraint: +opt_check_constraint: /* empty */ - | CHECK_SYM expr + | check_constraint + ; + +check_constraint: + CHECK_SYM expr ; opt_constraint: /* empty */ - | CONSTRAINT opt_ident; + | constraint; + +constraint: + CONSTRAINT opt_ident; field_spec: field_ident |