mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Enhance WhereLoopBuilder.iPlanLimit to handle a case involving the OR
optimization discovered overnight by OSSFuzz. FossilOrigin-Name: 7b59930a1d7b664b54d5a2bc9fa385925b5f4c8f34bf401c798307e3e2dae2c6
This commit is contained in:
@@ -2127,7 +2127,11 @@ static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){
|
||||
int rc;
|
||||
|
||||
/* Stop the search once we hit the query planner search limit */
|
||||
if( pBuilder->iPlanLimit==0 ) return SQLITE_DONE;
|
||||
if( pBuilder->iPlanLimit==0 ){
|
||||
WHERETRACE(0xffffffff,("=== query planner search limit reached ===\n"));
|
||||
if( pBuilder->pOrSet ) pBuilder->pOrSet->n = 0;
|
||||
return SQLITE_DONE;
|
||||
}
|
||||
pBuilder->iPlanLimit--;
|
||||
|
||||
/* If pBuilder->pOrSet is defined, then only keep track of the costs
|
||||
|
||||
Reference in New Issue
Block a user