From: drh Date: Wed, 20 Dec 2006 02:15:00 +0000 (+0000) Subject: Allow constraint names on DEFAULT values in a table definition. X-Git-Tag: version-3.6.10~2633 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b7acc35513dac7d9e118927a383b95b0d9a69c5;p=thirdparty%2Fsqlite.git Allow constraint names on DEFAULT values in a table definition. Ticket #2109. (CVS 3535) FossilOrigin-Name: 893d58c23da2a9b900a13eaa5202d94429862136 --- diff --git a/manifest b/manifest index 61ccd58daf..0da10ee6c4 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Build\swithout\swarnings\sand\spass\sall\stests\swith\sSQLITE_OMIT_LOAD_EXTENSION.\nTicket\s#2113.\s(CVS\s3534) -D 2006-12-19T18:57:11 +C Allow\sconstraint\snames\son\sDEFAULT\svalues\sin\sa\stable\sdefinition.\nTicket\s#2109.\s(CVS\s3535) +D 2006-12-20T02:15:00 F Makefile.in 8e14898d41a53033ecb687d93c9cd5d109fb9ae3 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -87,7 +87,7 @@ F src/os_win.c cac5f9b60faacd46874aa8dfefdb7dc4d0437ff9 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b F src/pager.c 814268d5bbd69f30069867142f1d460b8b7ab778 F src/pager.h 2e6d42f4ae004ae748a037b8468112b851c447a7 -F src/parse.y 9b3d1c0f8af81fe0cc909baf226865baa725bb23 +F src/parse.y 2f571c5f6219428d7fb08737db3d113742b1cceb F src/pragma.c d0891d3504b6291b506a5ec2226bbf79ffcef003 F src/prepare.c f4f45b4560defbb566cf8255763625d2c09a8023 F src/printf.c b179b6ed12f793e028dd169e2e2e2b2a37eedc63 @@ -423,7 +423,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 6f8a56231c4d0d990c54365f0ff0544bd8b3caf8 -R 574c656ba627cd0c820023301e6c98b4 +P c3d118b40811b201e4a98b62549c5439d7d5098d +R ee31e902c9098dae721605bcf38ca561 U drh -Z be9ea106ba788c036b500ebe0c1312a3 +Z 6de8d7d606a906d10c3edc457d084a8d diff --git a/manifest.uuid b/manifest.uuid index e6db0b8d73..2ad57094a0 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c3d118b40811b201e4a98b62549c5439d7d5098d \ No newline at end of file +893d58c23da2a9b900a13eaa5202d94429862136 \ No newline at end of file diff --git a/src/parse.y b/src/parse.y index eac525ea1f..8502f56ad0 100644 --- a/src/parse.y +++ b/src/parse.y @@ -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.211 2006/12/16 16:25:15 drh Exp $ +** @(#) $Id: parse.y,v 1.212 2006/12/20 02:15:00 drh Exp $ */ // All token codes are small integers with #defines that begin with "TK_" @@ -249,14 +249,14 @@ carglist ::= carglist carg. carglist ::= . carg ::= CONSTRAINT nm ccons. carg ::= ccons. -carg ::= DEFAULT term(X). {sqlite3AddDefaultValue(pParse,X);} -carg ::= DEFAULT LP expr(X) RP. {sqlite3AddDefaultValue(pParse,X);} -carg ::= DEFAULT PLUS term(X). {sqlite3AddDefaultValue(pParse,X);} -carg ::= DEFAULT MINUS term(X). { +ccons ::= DEFAULT term(X). {sqlite3AddDefaultValue(pParse,X);} +ccons ::= DEFAULT LP expr(X) RP. {sqlite3AddDefaultValue(pParse,X);} +ccons ::= DEFAULT PLUS term(X). {sqlite3AddDefaultValue(pParse,X);} +ccons ::= DEFAULT MINUS term(X). { Expr *p = sqlite3Expr(TK_UMINUS, X, 0, 0); sqlite3AddDefaultValue(pParse,p); } -carg ::= DEFAULT id(X). { +ccons ::= DEFAULT id(X). { Expr *p = sqlite3Expr(TK_STRING, 0, 0, &X); sqlite3AddDefaultValue(pParse,p); }