aboutsummaryrefslogtreecommitdiff
path: root/src/update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/update.c')
-rw-r--r--src/update.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/update.c b/src/update.c
index dd08b1668..92164b626 100644
--- a/src/update.c
+++ b/src/update.c
@@ -211,6 +211,11 @@ void sqlite3Update(
}
pParse->nTab++;
}
+ if( pUpsert ){
+ iDataCur = pUpsert->iDataCur;
+ iIdxCur = pUpsert->iIdxCur;
+ pParse->nTab = iBaseCur;
+ }
pTabList->a[0].iCursor = iDataCur;
/* Allocate space for aXRef[], aRegIdx[], and aToOpen[].
@@ -476,7 +481,7 @@ void sqlite3Update(
}
labelBreak = sqlite3VdbeMakeLabel(v);
- if( !isView ){
+ if( !isView && pUpsert==0 ){
int addrOnce = 0;
/* Open every index that needs updating. */