mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Use an OP_NotFound opcode to cancel futile IN operators early. The current
implementation is suboptimal because it always runs teh OP_NotFound. This still needs to be enhanced to only do the OP_NotFound if no results have been seen on the current loop. FossilOrigin-Name: 87a9fc504f9a78caf7a7949cc7ada0a19d61bfab51bb49a00a1607194c116212
This commit is contained in:
@@ -592,8 +592,12 @@ static int codeEqualityTerm(
|
||||
if( i==iEq ){
|
||||
pIn->iCur = iTab;
|
||||
pIn->eEndLoopOp = bRev ? OP_PrevIfOpen : OP_NextIfOpen;
|
||||
pIn->iBase = iReg - i;
|
||||
pIn->nPrefix = i;
|
||||
if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 ){
|
||||
pIn->iBase = iReg - i;
|
||||
pIn->nPrefix = i;
|
||||
}else{
|
||||
pIn->nPrefix = 0;
|
||||
}
|
||||
}else{
|
||||
pIn->eEndLoopOp = OP_Noop;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user