diff options
author | drh <drh@noemail.net> | 2008-09-17 00:13:12 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-09-17 00:13:12 +0000 |
commit | d176611b442a37df0714e7b3f55da802a2922c61 (patch) | |
tree | 849537ac0dd479035e39dd7c47d257af907e4309 /src/expr.c | |
parent | f44ed02790b153cd7069b20460408ca7ec11c892 (diff) | |
download | sqlite-d176611b442a37df0714e7b3f55da802a2922c61.tar.gz sqlite-d176611b442a37df0714e7b3f55da802a2922c61.zip |
Fix for tickets #3378 and #3381 that preserves the aliasing optimization.
And yet, this fix feels uncomfortable. Seeking an alternative... (CVS 5712)
FossilOrigin-Name: f8b759f1977915c314be874840ebf18e6bc69b57
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/expr.c b/src/expr.c index 3d742cd9c..ab0cf1e31 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.393 2008/09/16 18:02:47 drh Exp $ +** $Id: expr.c,v 1.394 2008/09/17 00:13:12 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -2456,7 +2456,7 @@ int sqlite3ExprCodeExprList( Parse *pParse, /* Parsing context */ ExprList *pList, /* The expression list to be coded */ int target, /* Where to write results */ - int doHardCopy /* Call sqlite3ExprHardCopy on each element if true */ + int doHardCopy /* Make a hard copy of every element */ ){ struct ExprList_item *pItem; int i, n; @@ -2464,17 +2464,16 @@ int sqlite3ExprCodeExprList( assert( target>0 ); n = pList->nExpr; for(pItem=pList->a, i=0; i<n; i++, pItem++){ -#if 0 /* Remove temporarily for tickets #3378 and #3381 */ if( pItem->iAlias ){ int iReg = codeAlias(pParse, pItem->iAlias, pItem->pExpr); Vdbe *v = sqlite3GetVdbe(pParse); sqlite3VdbeAddOp2(v, OP_SCopy, iReg, target+i); - }else -#endif - { + }else{ sqlite3ExprCode(pParse, pItem->pExpr, target+i); } - if( doHardCopy ) sqlite3ExprHardCopy(pParse, target, n); + if( doHardCopy ){ + sqlite3ExprHardCopy(pParse, target, n); + } } return n; } |