1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-24 08:21:29 +03:00

Back out part of (5546): Even though ON CONFLICT clauses on CHECK constraints

are no-ops, if a schema includes them, the database will be unreadable if
we do not at least parse and ignore the clause. (CVS 5548)

FossilOrigin-Name: efcaeb68f943daf135972ae045eff1ca157a7f22
This commit is contained in:
drh
2008-08-08 15:06:21 +00:00
parent 6382033cc5
commit e72e728b64
3 changed files with 9 additions and 9 deletions

View File

@@ -14,7 +14,7 @@
** the parser. Lemon will also generate a header file containing
** numeric codes for all of the tokens.
**
** @(#) $Id: parse.y,v 1.249 2008/08/08 14:19:41 drh Exp $
** @(#) $Id: parse.y,v 1.250 2008/08/08 15:06:22 drh Exp $
*/
// All token codes are small integers with #defines that begin with "TK_"
@@ -313,7 +313,7 @@ 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).
{sqlite3CreateIndex(pParse,0,0,0,X,R,0,0,0,0);}
tcons ::= CHECK LP expr(E) RP. {sqlite3AddCheckConstraint(pParse,E);}
tcons ::= CHECK LP expr(E) RP onconf. {sqlite3AddCheckConstraint(pParse,E);}
tcons ::= FOREIGN KEY LP idxlist(FA) RP
REFERENCES nm(T) idxlist_opt(TA) refargs(R) defer_subclause_opt(D). {
sqlite3CreateForeignKey(pParse, FA, &T, TA, R);