diff options
author | drh <> | 2022-04-04 20:20:22 +0000 |
---|---|---|
committer | drh <> | 2022-04-04 20:20:22 +0000 |
commit | ec534e6a23f305b571f448480b4bfed2de8f0c16 (patch) | |
tree | be0186e253009ef7e9ba242a094a707cb5c2fb93 /src | |
parent | 50f22d17a826c6141a17258ac15d98aefe445195 (diff) | |
download | sqlite-ec534e6a23f305b571f448480b4bfed2de8f0c16.tar.gz sqlite-ec534e6a23f305b571f448480b4bfed2de8f0c16.zip |
Small performance and size improvement to OP_Found.
FossilOrigin-Name: 81587a18b7c0516628453000172a0c58e74ee173c15f655d035799d84d4e2d81
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbe.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index c29198f74..02d0988f1 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -4968,7 +4968,6 @@ case OP_Found: { /* jump, in3 */ int alreadyExists; int ii; VdbeCursor *pC; - int res; UnpackedRecord *pIdxKey; UnpackedRecord r; @@ -5000,7 +4999,7 @@ case OP_Found: { /* jump, in3 */ if( ii ) REGISTER_TRACE(pOp->p3+ii, &r.aMem[ii]); } #endif - rc = sqlite3BtreeIndexMoveto(pC->uc.pCursor, &r, &res); + rc = sqlite3BtreeIndexMoveto(pC->uc.pCursor, &r, &pC->seekResult); }else{ /* Composite key generated by OP_MakeRecord */ assert( pIn3->flags & MEM_Blob ); @@ -5012,14 +5011,13 @@ case OP_Found: { /* jump, in3 */ if( pIdxKey==0 ) goto no_mem; sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z, pIdxKey); pIdxKey->default_rc = 0; - rc = sqlite3BtreeIndexMoveto(pC->uc.pCursor, pIdxKey, &res); + rc = sqlite3BtreeIndexMoveto(pC->uc.pCursor, pIdxKey, &pC->seekResult); sqlite3DbFreeNN(db, pIdxKey); } if( rc!=SQLITE_OK ){ goto abort_due_to_error; } - pC->seekResult = res; - alreadyExists = (res==0); + alreadyExists = (pC->seekResult==0); pC->nullRow = 1-alreadyExists; pC->deferredMoveto = 0; pC->cacheStatus = CACHE_STALE; |