diff options
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/expr.c b/src/expr.c index b9979d602..7ed692964 100644 --- a/src/expr.c +++ b/src/expr.c @@ -12,7 +12,7 @@ ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** -** $Id: expr.c,v 1.441 2009/05/29 19:00:13 drh Exp $ +** $Id: expr.c,v 1.442 2009/05/30 14:16:32 drh Exp $ */ #include "sqliteInt.h" @@ -2403,8 +2403,8 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){ pDef = sqlite3VtabOverloadFunction(db, pDef, nFarg, pFarg->a[0].pExpr); } #endif - for(i=0; i<nFarg && i<32; i++){ - if( sqlite3ExprIsConstant(pFarg->a[i].pExpr) ){ + for(i=0; i<nFarg; i++){ + if( i<32 && sqlite3ExprIsConstant(pFarg->a[i].pExpr) ){ constMask |= (1<<i); } if( (pDef->flags & SQLITE_FUNC_NEEDCOLL)!=0 && !pColl ){ @@ -2429,9 +2429,7 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){ case TK_SELECT: { testcase( op==TK_EXISTS ); testcase( op==TK_SELECT ); - if( pExpr->iColumn==0 ){ - sqlite3CodeSubselect(pParse, pExpr, 0, 0); - } + sqlite3CodeSubselect(pParse, pExpr, 0, 0); inReg = pExpr->iColumn; break; } |