diff options
author | drh <drh@noemail.net> | 2009-05-30 14:16:31 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2009-05-30 14:16:31 +0000 |
commit | f7bca5740de1ae832fff2c756e0801c3202f5fd0 (patch) | |
tree | 1fb401832e6bb4ae71a242a85bd2a33f5797f306 /src/expr.c | |
parent | 43996e858ba1cf50a3fc3fb7b39c3e49e10309c6 (diff) | |
download | sqlite-f7bca5740de1ae832fff2c756e0801c3202f5fd0.tar.gz sqlite-f7bca5740de1ae832fff2c756e0801c3202f5fd0.zip |
Fix for ticket #3887. Other unrelated bits of code cleanup in the expr.c
source module. (CVS 6693)
FossilOrigin-Name: 00e7250f11e190cd915870438d172f574d110e6d
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; } |