aboutsummaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/where.c b/src/where.c
index 6dc326be0..68abfdfe1 100644
--- a/src/where.c
+++ b/src/where.c
@@ -180,7 +180,7 @@ static WhereTerm *whereScanNext(WhereScan *pScan){
while( pScan->iEquiv<=pScan->nEquiv ){
iCur = pScan->aiCur[pScan->iEquiv-1];
iColumn = pScan->aiColumn[pScan->iEquiv-1];
- if( iColumn==(-2) && pScan->pIdxExpr==0 ) return 0;
+ assert( iColumn!=(-2) || pScan->pIdxExpr!=0 );
while( (pWC = pScan->pWC)!=0 ){
for(pTerm=pWC->a+k; k<pWC->nTerm; k++, pTerm++){
if( pTerm->leftCursor==iCur
@@ -396,6 +396,7 @@ static int indexColumnNotNull(Index *pIdx, int iCol){
}else{
assert( j==(-2) );
return 0; /* Assume an indexed expression can always yield a NULL */
+
}
}
@@ -803,7 +804,7 @@ static sqlite3_index_info *allocateIndexInfo(
testcase( pTerm->eOperator & WO_ALL );
if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV|WO_IS))==0 ) continue;
if( pTerm->wtFlags & TERM_VNULL ) continue;
- if( pTerm->u.leftColumn<(-1) ) continue;
+ assert( pTerm->u.leftColumn>=(-1) );
nTerm++;
}
@@ -859,7 +860,7 @@ static sqlite3_index_info *allocateIndexInfo(
testcase( pTerm->eOperator & WO_ALL );
if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV|WO_IS))==0 ) continue;
if( pTerm->wtFlags & TERM_VNULL ) continue;
- if( pTerm->u.leftColumn<(-1) ) continue;
+ assert( pTerm->u.leftColumn>=(-1) );
pIdxCons[j].iColumn = pTerm->u.leftColumn;
pIdxCons[j].iTermOffset = i;
op = (u8)pTerm->eOperator & WO_ALL;