Index: src/where.c ================================================================== --- src/where.c +++ src/where.c @@ -3715,11 +3715,11 @@ ** Return TRUE if the set of WHERE clause terms used by pA is a proper ** subset of the WHERE clause terms used by pB. */ static int whereLoopProperSubset(const WhereLoop *pA, const WhereLoop *pB){ int i, j; - if( pA->nLTerm>=pB->nLTerm ) return 0; + assert( pA->nLTermnLTerm ); /* Checked by calling function */ for(j=0, i=pA->nLTerm-1; i>=0 && j>=0; i--){ for(j=pB->nLTerm-1; j>=0; j--){ if( pB->aLTerm[j]==pA->aLTerm[i] ) break; } }