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

Small performance optimizations.

FossilOrigin-Name: 99fd34b58a9b09af20f1f1a3c37137ae55159310c8af97806550eeee6adc4fc5
This commit is contained in:
drh
2024-07-05 01:05:34 +00:00
parent a61f11f307
commit 615fc1f083
4 changed files with 13 additions and 10 deletions

View File

@@ -3436,6 +3436,7 @@ static int findCompatibleInRhsSubrtn(
Vdbe *v;
if( pNewSig==0 ) return 0;
if( pParse->bHasSubrtn==0 ) return 0;
assert( pExpr->op==TK_IN );
assert( !ExprUseYSub(pExpr) );
assert( ExprUseXSelect(pExpr) );
@@ -3446,8 +3447,8 @@ static int findCompatibleInRhsSubrtn(
pOp = sqlite3VdbeGetOp(v, 1);
pEnd = sqlite3VdbeGetLastOp(v);
for(; pOp<pEnd; pOp++){
if( pOp->opcode!=OP_BeginSubrtn ) continue;
if( pOp->p4type!=P4_SUBRTNSIG ) continue;
assert( pOp->opcode==OP_BeginSubrtn );
pSig = pOp->p4.pSubrtnSig;
assert( pSig!=0 );
if( pNewSig->selId!=pSig->selId ) continue;
@@ -3563,6 +3564,7 @@ void sqlite3CodeRhsOfIN(
pSig->regReturn = pExpr->y.sub.regReturn;
pSig->iTable = iTab;
sqlite3VdbeChangeP4(v, -1, (const char*)pSig, P4_SUBRTNSIG);
pParse->bHasSubrtn = 1;
}
addrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);
}