diff options
author | dan <dan@noemail.net> | 2017-01-11 20:10:30 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2017-01-11 20:10:30 +0000 |
commit | e206ea7f480e7d68db9aaa7e3415bef3f66d3be6 (patch) | |
tree | 74326f5b68a6756798648e0d46b045e0d57479a5 /src | |
parent | 2c6fec21dc38810eacc702467f2b909f7325608f (diff) | |
download | sqlite-e206ea7f480e7d68db9aaa7e3415bef3f66d3be6.tar.gz sqlite-e206ea7f480e7d68db9aaa7e3415bef3f66d3be6.zip |
Fix a problem causing the pre-update hook to be passed an incorrect rowid
value in some single-pass multi-row updates.
FossilOrigin-Name: 62257eb53c13d4c7ed128d5d89f6f10d4aff945c
Diffstat (limited to 'src')
-rw-r--r-- | src/update.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/update.c b/src/update.c index 242d36b73..e1cbc21da 100644 --- a/src/update.c +++ b/src/update.c @@ -643,6 +643,10 @@ void sqlite3Update( OPFLAG_ISUPDATE | ((hasFK || chngKey) ? 0 : OPFLAG_ISNOOP), regNewRowid ); + if( eOnePass==ONEPASS_MULTI ){ + assert( hasFK==0 && chngKey==0 ); + sqlite3VdbeChangeP5(v, OPFLAG_SAVEPOSITION); + } if( !pParse->nested ){ sqlite3VdbeAppendP4(v, pTab, P4_TABLE); } |