aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parse.y3
-rw-r--r--src/tokenize.c3
-rw-r--r--src/trigger.c6
3 files changed, 10 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y
index cffdce119..ead734512 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.66 2002/05/21 11:38:12 drh Exp $
+** @(#) $Id: parse.y,v 1.67 2002/05/23 00:30:31 drh Exp $
*/
%token_prefix TK_
%token_type {Token}
@@ -124,6 +124,7 @@ id(A) ::= OFFSET(X). {A = X;}
id(A) ::= PRAGMA(X). {A = X;}
id(A) ::= REPLACE(X). {A = X;}
id(A) ::= ROW(X). {A = X;}
+id(A) ::= STATEMENT(X). {A = X;}
id(A) ::= TEMP(X). {A = X;}
id(A) ::= TRIGGER(X). {A = X;}
id(A) ::= VACUUM(X). {A = X;}
diff --git a/src/tokenize.c b/src/tokenize.c
index 00f4e0741..306dc3468 100644
--- a/src/tokenize.c
+++ b/src/tokenize.c
@@ -15,7 +15,7 @@
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
-** $Id: tokenize.c,v 1.41 2002/05/15 08:30:14 danielk1977 Exp $
+** $Id: tokenize.c,v 1.42 2002/05/23 00:30:31 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -100,6 +100,7 @@ static Keyword aKeywordTable[] = {
{ "ROW", 0, TK_ROW, 0 },
{ "SELECT", 0, TK_SELECT, 0 },
{ "SET", 0, TK_SET, 0 },
+ { "STATEMENT", 0, TK_STATEMENT, 0 },
{ "TABLE", 0, TK_TABLE, 0 },
{ "TEMP", 0, TK_TEMP, 0 },
{ "TEMPORARY", 0, TK_TEMP, 0 },
diff --git a/src/trigger.c b/src/trigger.c
index 3f6139d9a..5864b7d8c 100644
--- a/src/trigger.c
+++ b/src/trigger.c
@@ -60,6 +60,12 @@ void sqliteCreateTrigger(
pParse->nErr++;
goto trigger_cleanup;
}
+ if( sqliteStrICmp(tab->zName, MASTER_NAME)==0 ){
+ sqliteSetString(&pParse->zErrMsg, "cannot create trigger on system "
+ "table: " MASTER_NAME, 0);
+ pParse->nErr++;
+ goto trigger_cleanup;
+ }
}
/* Build the Trigger object */