mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-19 21:43:15 +03:00
Fix a potential reference off the end of an array in the query planner.
FossilOrigin-Name: f15591f80212dd6d4ed8e0f14be691cd578d4cdf
This commit is contained in:
@@ -4337,7 +4337,9 @@ static int whereLoopAddBtreeIndex(
|
||||
int nIn = 0;
|
||||
if( pTerm->prereqRight & pNew->maskSelf ) continue;
|
||||
#ifdef SQLITE_ENABLE_STAT3
|
||||
if( (pTerm->wtFlags & TERM_VNULL)!=0 && pSrc->pTab->aCol[iCol].notNull ){
|
||||
if( (pTerm->wtFlags & TERM_VNULL)!=0
|
||||
&& (iCol<0 || pSrc->pTab->aCol[iCol].notNull)
|
||||
){
|
||||
continue; /* skip IS NOT NULL constraints on a NOT NULL column */
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user