diff options
author | drh <drh@noemail.net> | 2010-05-12 13:50:23 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-05-12 13:50:23 +0000 |
commit | eaf52d883a9eafbe7ad60bd7590988c66d696c07 (patch) | |
tree | 709995fa0fa9c676a4f8661e767179c76418a234 /src/expr.c | |
parent | ed36020daf6bd8cca83e9af5c1af81fad1824700 (diff) | |
download | sqlite-eaf52d883a9eafbe7ad60bd7590988c66d696c07.tar.gz sqlite-eaf52d883a9eafbe7ad60bd7590988c66d696c07.zip |
Remove the OP_Variable optimization of check-in [48b77b04935d894] since it
can lead to malfunctions as described in ticket [26ff0c82d1e90].
FossilOrigin-Name: 7838163d087780a6fb403a17641b96f71baec088
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/expr.c b/src/expr.c index 70526aea6..f82f6d429 100644 --- a/src/expr.c +++ b/src/expr.c @@ -2353,27 +2353,12 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){ } #endif case TK_VARIABLE: { - VdbeOp *pOp; assert( !ExprHasProperty(pExpr, EP_IntValue) ); assert( pExpr->u.zToken!=0 ); assert( pExpr->u.zToken[0]!=0 ); - if( pExpr->u.zToken[1]==0 - && (pOp = sqlite3VdbeGetOp(v, -1))->opcode==OP_Variable - && pOp->p1+pOp->p3==pExpr->iColumn - && pOp->p2+pOp->p3==target - && pOp->p4.z==0 - ){ - /* If the previous instruction was a copy of the previous unnamed - ** parameter into the previous register, then simply increment the - ** repeat count on the prior instruction rather than making a new - ** instruction. - */ - pOp->p3++; - }else{ - sqlite3VdbeAddOp3(v, OP_Variable, pExpr->iColumn, target, 1); - if( pExpr->u.zToken[1]!=0 ){ - sqlite3VdbeChangeP4(v, -1, pExpr->u.zToken, 0); - } + sqlite3VdbeAddOp2(v, OP_Variable, pExpr->iColumn, target); + if( pExpr->u.zToken[1]!=0 ){ + sqlite3VdbeChangeP4(v, -1, pExpr->u.zToken, 0); } break; } |