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

Disallow the ON CONFLICT clause on CHECK constraints. The syntax used to be

allowed but never worked, so this should not present compatibility problems.
Other internal grammar simplifications. (CVS 5546)

FossilOrigin-Name: 4cedc641ed39982ae8cbb9200aa1e2f37c878b73
This commit is contained in:
drh
2008-08-08 14:19:41 +00:00
parent a33cb5f776
commit 200a81dcb5
6 changed files with 26 additions and 30 deletions

View File

@@ -15,7 +15,7 @@
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
** $Id: tokenize.c,v 1.149 2008/08/07 13:05:36 drh Exp $
** $Id: tokenize.c,v 1.150 2008/08/08 14:19:41 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -131,7 +131,7 @@ int sqlite3GetToken(const unsigned char *z, int *tokenType){
case '-': {
if( z[1]=='-' ){
for(i=2; (c=z[i])!=0 && c!='\n'; i++){}
*tokenType = TK_COMMENT;
*tokenType = TK_SPACE;
return i;
}
*tokenType = TK_MINUS;
@@ -164,7 +164,7 @@ int sqlite3GetToken(const unsigned char *z, int *tokenType){
}
for(i=3, c=z[2]; (c!='*' || z[i]!='/') && (c=z[i])!=0; i++){}
if( c ) i++;
*tokenType = TK_COMMENT;
*tokenType = TK_SPACE;
return i;
}
case '%': {
@@ -420,8 +420,7 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
break;
}
switch( tokenType ){
case TK_SPACE:
case TK_COMMENT: {
case TK_SPACE: {
if( db->u1.isInterrupted ){
pParse->rc = SQLITE_INTERRUPT;
sqlite3SetString(pzErrMsg, db, "interrupt");