aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-07-23 21:59:58 +0000
committerdrh <drh@noemail.net>2015-07-23 21:59:58 +0000
commit244c8d7077ea25763bf2efce123da2f7d2d811cc (patch)
tree76ee15618f861fe989e7b16dfaca84bb121f35a3 /src/wherecode.c
parent38151adfe2f51c07ca50e9cbc6f44a9811097eb1 (diff)
parentcfb8f8d6a9073040e90f0bf502f4b108d7917433 (diff)
downloadsqlite-244c8d7077ea25763bf2efce123da2f7d2d811cc.tar.gz
sqlite-244c8d7077ea25763bf2efce123da2f7d2d811cc.zip
Merge all changes in the latest 3.8.11 beta into the sessions branch.
Changes include the rename of OTA to RBU, the WITHOUT-ROWID-OR-Skipscan fix, and improvements to pcache1. FossilOrigin-Name: 7f0ee77062d2fcb014942c7c62c163ccc801f21b
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index e1f0f8661..9747f7f37 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -1296,7 +1296,11 @@ Bitmask sqlite3WhereCodeOneLoopStart(
r = sqlite3GetTempRange(pParse, nPk);
for(iPk=0; iPk<nPk; iPk++){
int iCol = pPk->aiColumn[iPk];
- sqlite3ExprCodeGetColumn(pParse, pTab, iCol, iCur, r+iPk, 0);
+ int rx;
+ rx = sqlite3ExprCodeGetColumn(pParse, pTab, iCol, iCur,r+iPk,0);
+ if( rx!=r+iPk ){
+ sqlite3VdbeAddOp2(v, OP_SCopy, rx, r+iPk);
+ }
}
/* Check if the temp table already contains this key. If so,