mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Small performance optimizations.
FossilOrigin-Name: 99fd34b58a9b09af20f1f1a3c37137ae55159310c8af97806550eeee6adc4fc5
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
@ -3834,6 +3834,7 @@ struct Parse {
|
||||
u8 prepFlags; /* SQLITE_PREPARE_* flags */
|
||||
u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */
|
||||
u8 bHasWith; /* True if statement contains WITH */
|
||||
u8 bHasSubrtn; /* True if any P4_SUBRTNSIG has been set */
|
||||
#if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)
|
||||
u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user