diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c index 41e5da555..d7f88f701 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.76 2002/03/14 14:33:31 drh Exp $ +** $Id: select.c,v 1.77 2002/03/23 00:31:29 drh Exp $ */ #include "sqliteInt.h" @@ -610,6 +610,13 @@ static int multiSelect(Parse *pParse, Select *p, int eDest, int iParm){ v = sqliteGetVdbe(pParse); if( v==0 ) return 1; + /* Create the destination temporary table if necessary + */ + if( eDest==SRT_TempTable ){ + sqliteVdbeAddOp(v, OP_OpenTemp, iParm, 0); + eDest = SRT_Table; + } + /* Process the UNION or INTERSECTION */ base = pParse->nTab; |