aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-12-14 17:43:37 +0000
committerdrh <drh@noemail.net>2019-12-14 17:43:37 +0000
commit99670abb82c4c67d528a554ef994a0d4e47b7199 (patch)
treed2ea7c7ff598f311a0c50a647a08bb85d7777c01 /src
parentaac30f9b5020f5af1bce935f3d90e9dab3722ba2 (diff)
downloadsqlite-99670abb82c4c67d528a554ef994a0d4e47b7199.tar.gz
sqlite-99670abb82c4c67d528a554ef994a0d4e47b7199.zip
Do not set OP_Column flags on the instructions generated by
sqlite3ExprCodeGetColumn() if the opcode generated is not really an OP_Column, which might happen if the column is virtual. Fix for ticket [b439bfcfb7deedc6] FossilOrigin-Name: 2401e04730a156aa48787b91af4e516406cb7635145e430be62fd16481816237
Diffstat (limited to 'src')
-rw-r--r--src/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index c6920b3c8..3552322ef 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3487,7 +3487,8 @@ int sqlite3ExprCodeGetColumn(
assert( pParse->pVdbe!=0 );
sqlite3ExprCodeGetColumnOfTable(pParse->pVdbe, pTab, iTable, iColumn, iReg);
if( p5 ){
- sqlite3VdbeChangeP5(pParse->pVdbe, p5);
+ VdbeOp *pOp = sqlite3VdbeGetOp(pParse->pVdbe,-1);
+ if( pOp->opcode==OP_Column ) pOp->p5 = p5;
}
return iReg;
}