1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

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
This commit is contained in:
dan
2017-01-11 20:10:30 +00:00
parent 2c6fec21dc
commit e206ea7f48
3 changed files with 11 additions and 7 deletions

View File

@@ -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);
}