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

Fix some test logic in the OP_Delete opcode so that it works after a

cursor-trip.

FossilOrigin-Name: 28900e5cab73f9edb9383d64a37e14fed0602966cb704ddffa60c0281698fd52
This commit is contained in:
drh
2020-01-02 19:50:50 +00:00
parent 1b39aab08d
commit 6b559f3033
3 changed files with 12 additions and 8 deletions

View File

@@ -4995,7 +4995,11 @@ case OP_Delete: {
sqlite3VdbeIncrWriteCounter(p, pC);
#ifdef SQLITE_DEBUG
if( pOp->p4type==P4_TABLE && HasRowid(pOp->p4.pTab) && pOp->p5==0 ){
if( pOp->p4type==P4_TABLE
&& HasRowid(pOp->p4.pTab)
&& pOp->p5==0
&& sqlite3BtreeCursorIsValidNN(pC->uc.pCursor)
){
/* If p5 is zero, the seek operation that positioned the cursor prior to
** OP_Delete will have also set the pC->movetoTarget field to the rowid of
** the row that is being deleted */