aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2012-05-12 18:29:53 +0000
committerdrh <drh@noemail.net>2012-05-12 18:29:53 +0000
commitab35eaed1fd66e1bae587255c75edee4910ecf2e (patch)
tree98d2ce0b5c454d29a1f6e4a86dda47270f16b556 /src
parent64b95bbcdc7df1262d1fb69f2fca6c523941ea9f (diff)
downloadsqlite-ab35eaed1fd66e1bae587255c75edee4910ecf2e.tar.gz
sqlite-ab35eaed1fd66e1bae587255c75edee4910ecf2e.zip
Parser bug fix: Make sure the table constraints allowed by prior releases
can still be parsed, even if they are technically not allowed by the syntax diagram. FossilOrigin-Name: e536ac041815b118c461ceee798f9b7283269f58
Diffstat (limited to 'src')
-rw-r--r--src/parse.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/parse.y b/src/parse.y
index 8b5635c67..94433d539 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -340,12 +340,12 @@ init_deferred_pred_opt(A) ::= INITIALLY DEFERRED. {A = 1;}
init_deferred_pred_opt(A) ::= INITIALLY IMMEDIATE. {A = 0;}
conslist_opt(A) ::= . {A.n = 0; A.z = 0;}
-conslist_opt(A) ::= COMMA(X) conslist cname. {A = X;}
-conslist ::= conslist COMMA cname tcons.
-conslist ::= conslist cname tcons.
-conslist ::= cname tcons.
-cname ::= . {pParse->constraintName.n = 0;}
-cname ::= CONSTRAINT nm(X). {pParse->constraintName = X;}
+conslist_opt(A) ::= COMMA(X) conslist. {A = X;}
+conslist ::= conslist tconscomma tcons.
+conslist ::= tcons.
+tconscomma ::= COMMA. {pParse->constraintName.n = 0;}
+tconscomma ::= .
+tcons ::= CONSTRAINT nm(X). {pParse->constraintName = X;}
tcons ::= PRIMARY KEY LP idxlist(X) autoinc(I) RP onconf(R).
{sqlite3AddPrimaryKey(pParse,X,R,I,0);}
tcons ::= UNIQUE LP idxlist(X) RP onconf(R).