1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Avoid an unnecessary btree seek while deleting an index entry due to a conflict

on a REPLACE operation.

FossilOrigin-Name: f0495c5133d0dc04d63521136d6b9ca440792cdf
This commit is contained in:
drh
2017-01-07 03:26:50 +00:00
parent a67b5cb6b3
commit ad1d9a8707
4 changed files with 10 additions and 10 deletions

View File

@@ -716,7 +716,7 @@ void sqlite3GenerateRowDelete(
if( eMode!=ONEPASS_OFF ){
sqlite3VdbeChangeP5(v, OPFLAG_AUXDELETE);
}
if( iIdxNoSeek>=0 ){
if( iIdxNoSeek>=0 && iIdxNoSeek!=iDataCur ){
sqlite3VdbeAddOp1(v, OP_Delete, iIdxNoSeek);
}
if( eMode==ONEPASS_MULTI ) p5 |= OPFLAG_SAVEPOSITION;