mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Small performance and size improvement to OP_Found.
FossilOrigin-Name: 81587a18b7c0516628453000172a0c58e74ee173c15f655d035799d84d4e2d81
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user