aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/select.c b/src/select.c
index 4b462486d..eb2892f24 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.126 2003/02/02 12:41:26 drh Exp $
+** $Id: select.c,v 1.127 2003/03/19 03:14:02 drh Exp $
*/
#include "sqliteInt.h"
@@ -1768,7 +1768,6 @@ static int simpleMinMaxQuery(Parse *pParse, Select *p, int eDest, int iParm){
Index *pIdx;
int base;
Vdbe *v;
- int openOp;
int seekOp;
int cont;
ExprList eList;
@@ -1828,17 +1827,17 @@ static int simpleMinMaxQuery(Parse *pParse, Select *p, int eDest, int iParm){
** or last entry in the main table.
*/
if( !pParse->schemaVerified && (pParse->db->flags & SQLITE_InTrans)==0 ){
- sqliteVdbeAddOp(v, OP_VerifyCookie, pParse->db->schema_cookie, 0);
- pParse->schemaVerified = 1;
+ sqliteCodeVerifySchema(pParse);
}
- openOp = pTab->isTemp ? OP_OpenAux : OP_Open;
base = p->base;
- sqliteVdbeAddOp(v, openOp, base, pTab->tnum);
+ sqliteVdbeAddOp(v, OP_Integer, pTab->isTemp, 0);
+ sqliteVdbeAddOp(v, OP_OpenRead, base, pTab->tnum);
sqliteVdbeChangeP3(v, -1, pTab->zName, P3_STATIC);
if( pIdx==0 ){
sqliteVdbeAddOp(v, seekOp, base, 0);
}else{
- sqliteVdbeAddOp(v, openOp, base+1, pIdx->tnum);
+ sqliteVdbeAddOp(v, OP_Integer, pTab->isTemp, 0);
+ sqliteVdbeAddOp(v, OP_OpenRead, base+1, pIdx->tnum);
sqliteVdbeChangeP3(v, -1, pIdx->zName, P3_STATIC);
sqliteVdbeAddOp(v, seekOp, base+1, 0);
sqliteVdbeAddOp(v, OP_IdxRecno, base+1, 0);