1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-24 22:22:08 +03:00

Add a new OP_SeekRowid opcode, that combines the functions of OP_MustBeInt

and OP_NotExists.  This makes the code slightly smaller and faster.

FossilOrigin-Name: ffe80a1bfa014943a614fc6993c1749b9bfec4c1
This commit is contained in:
drh
2016-05-26 20:56:38 +00:00
parent ce3c5011d9
commit eeb9565a3e
6 changed files with 57 additions and 23 deletions

View File

@ -971,8 +971,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, 0, bRev, iReleaseReg);
if( iRowidReg!=iReleaseReg ) sqlite3ReleaseTempReg(pParse, iReleaseReg);
addrNxt = pLevel->addrNxt;
sqlite3VdbeAddOp2(v, OP_MustBeInt, iRowidReg, addrNxt); VdbeCoverage(v);
sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addrNxt, iRowidReg);
sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg);
VdbeCoverage(v);
sqlite3ExprCacheAffinityChange(pParse, iRowidReg, 1);
sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);