diff options
author | drh <> | 2021-05-28 12:48:31 +0000 |
---|---|---|
committer | drh <> | 2021-05-28 12:48:31 +0000 |
commit | e9de65201c7630f9b587b8b14d1caecf2ca4c8d4 (patch) | |
tree | 6dbee12bce0d3486e011f3b03c3aeb2c424760bd /src/wherecode.c | |
parent | d2f55773f1ef16132103f6b607802a59a00013b8 (diff) | |
download | sqlite-e9de65201c7630f9b587b8b14d1caecf2ca4c8d4.tar.gz sqlite-e9de65201c7630f9b587b8b14d1caecf2ca4c8d4.zip |
Make a deep copy of the result of a subquery in case the subquery is
reused. Fix for the problem reported by
[forum:/forumpost/28216b36ac|forum post 28216b36ac] and introduced by
check-in [f30fb19ff763a7cb]. Further changes to try to optimize the new
OP_Copy opcode back into either OP_SCopy or OP_Move will be attempted
separately. A test case will be in TH3.
FossilOrigin-Name: c9f0b9cb0aef107265435e22c164dd3c974eadfd00abf7cfd4fc7ec95c0dd7d0
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index 71ba9f763..84fa1a141 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -756,7 +756,7 @@ static int codeAllEqualityTerms( sqlite3ReleaseTempReg(pParse, regBase); regBase = r1; }else{ - sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j); + sqlite3VdbeAddOp2(v, OP_Copy, r1, regBase+j); } } if( pTerm->eOperator & WO_IN ){ |