aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/build.c7
-rw-r--r--src/parse.y6
-rw-r--r--src/sqliteInt.h4
3 files changed, 9 insertions, 8 deletions
diff --git a/src/build.c b/src/build.c
index 9f1aa9cd2..74bd54817 100644
--- a/src/build.c
+++ b/src/build.c
@@ -25,7 +25,7 @@
** ROLLBACK
** PRAGMA
**
-** $Id: build.c,v 1.101 2002/07/05 21:42:36 drh Exp $
+** $Id: build.c,v 1.102 2002/07/08 22:03:32 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -839,14 +839,15 @@ void sqliteCreateView(
Parse *pParse, /* The parsing context */
Token *pBegin, /* The CREATE token that begins the statement */
Token *pName, /* The token that holds the name of the view */
- Select *pSelect /* A SELECT statement that will become the new view */
+ Select *pSelect, /* A SELECT statement that will become the new view */
+ int isTemp /* TRUE for a TEMPORARY view */
){
Token sEnd;
Table *p;
const char *z;
int n, offset;
- sqliteStartTable(pParse, pBegin, pName, 0);
+ sqliteStartTable(pParse, pBegin, pName, isTemp);
p = pParse->pNewTable;
if( p==0 ){
sqliteSelectDelete(pSelect);
diff --git a/src/parse.y b/src/parse.y
index 6a2e3dc86..d98cb8440 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.77 2002/07/05 21:42:37 drh Exp $
+** @(#) $Id: parse.y,v 1.78 2002/07/08 22:03:32 drh Exp $
*/
%token_prefix TK_
%token_type {Token}
@@ -234,8 +234,8 @@ cmd ::= DROP TABLE nm(X). {sqliteDropTable(pParse,&X,0);}
///////////////////// The CREATE VIEW statement /////////////////////////////
//
-cmd ::= CREATE(X) VIEW nm(Y) AS select(S). {
- sqliteCreateView(pParse, &X, &Y, S);
+cmd ::= CREATE(X) temp(T) VIEW nm(Y) AS select(S). {
+ sqliteCreateView(pParse, &X, &Y, S, T);
}
cmd ::= DROP VIEW nm(X). {
sqliteDropTable(pParse, &X, 1);
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 7b7e14232..5f9056745 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.134 2002/07/05 21:42:37 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.135 2002/07/08 22:03:32 drh Exp $
*/
#include "sqlite.h"
#include "hash.h"
@@ -857,7 +857,7 @@ void sqliteAddDefaultValue(Parse*,Token*,int);
int sqliteCollateType(Parse*, Token*);
void sqliteAddCollateType(Parse*, int);
void sqliteEndTable(Parse*,Token*,Select*);
-void sqliteCreateView(Parse*,Token*,Token*,Select*);
+void sqliteCreateView(Parse*,Token*,Token*,Select*,int);
int sqliteViewGetColumnNames(Parse*,Table*);
void sqliteViewResetAll(sqlite*);
void sqliteDropTable(Parse*, Token*, int);