aboutsummaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-09-24 14:26:51 +0000
committerdrh <drh@noemail.net>2015-09-24 14:26:51 +0000
commit9ec0efd946b8015f8b3ba3b726bc39f0b15d306c (patch)
treeb4764dfa9ca1b2d064f80f3d13056f2b5bbeba61 /src/where.c
parent438b881540c83370029c73c8a1d7eba78979c491 (diff)
parent22c733da644bcf8d614b7caf058c7a2b51286ab8 (diff)
downloadsqlite-9ec0efd946b8015f8b3ba3b726bc39f0b15d306c.tar.gz
sqlite-9ec0efd946b8015f8b3ba3b726bc39f0b15d306c.zip
Merge all the latest trunk enhancements into the sessions branch.
FossilOrigin-Name: c91065f8edb1e54076791716fc20d3fcfe3070dc
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/where.c b/src/where.c
index 69b7c064e..1e13cf0ed 100644
--- a/src/where.c
+++ b/src/where.c
@@ -182,7 +182,7 @@ static WhereTerm *whereScanNext(WhereScan *pScan){
while( pScan->iEquiv<=pScan->nEquiv ){
iCur = pScan->aiCur[pScan->iEquiv-1];
iColumn = pScan->aiColumn[pScan->iEquiv-1];
- assert( iColumn!=(-2) || pScan->pIdxExpr!=0 );
+ if( iColumn==(-2) && pScan->pIdxExpr==0 ) return 0;
while( (pWC = pScan->pWC)!=0 ){
for(pTerm=pWC->a+k; k<pWC->nTerm; k++, pTerm++){
if( pTerm->leftCursor==iCur
@@ -193,10 +193,9 @@ static WhereTerm *whereScanNext(WhereScan *pScan){
){
if( (pTerm->eOperator & WO_EQUIV)!=0
&& pScan->nEquiv<ArraySize(pScan->aiCur)
+ && (pX = sqlite3ExprSkipCollate(pTerm->pExpr->pRight))->op==TK_COLUMN
){
int j;
- pX = sqlite3ExprSkipCollate(pTerm->pExpr->pRight);
- assert( pX->op==TK_COLUMN );
for(j=0; j<pScan->nEquiv; j++){
if( pScan->aiCur[j]==pX->iTable
&& pScan->aiColumn[j]==pX->iColumn ){