aboutsummaryrefslogtreecommitdiff
path: root/src/whereexpr.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2016-07-29 18:12:12 +0000
committerdan <dan@noemail.net>2016-07-29 18:12:12 +0000
commit145b4ea519b7826e7905628c479549994e405b0b (patch)
tree146ca79f037aed1d233d1a6c112b9135fa1a905e /src/whereexpr.c
parent7b35a77b1a389d87cb5df356266b400e07d55afb (diff)
downloadsqlite-145b4ea519b7826e7905628c479549994e405b0b.tar.gz
sqlite-145b4ea519b7826e7905628c479549994e405b0b.zip
Change the way "(a, b) = (SELECT *)" expressions are handled in where.c if there is an index on one of the columns only.
FossilOrigin-Name: 4dfebff2924f46284d5b9cda69175f79b29d6028
Diffstat (limited to 'src/whereexpr.c')
-rw-r--r--src/whereexpr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/whereexpr.c b/src/whereexpr.c
index 9c9be9903..4b96e2faa 100644
--- a/src/whereexpr.c
+++ b/src/whereexpr.c
@@ -962,7 +962,8 @@ static void exprAnalyze(
Expr *pRight = sqlite3ExprSkipCollate(pExpr->pRight);
u16 opMask = (pTerm->prereqRight & prereqLeft)==0 ? WO_ALL : WO_EQUIV;
- if( op==TK_IN && pTerm->iField>0 ){
+ if( pTerm->iField>0 ){
+ assert( op==TK_IN );
assert( pLeft->op==TK_VECTOR );
pLeft = pLeft->x.pList->a[pTerm->iField-1].pExpr;
}
@@ -979,6 +980,7 @@ static void exprAnalyze(
WhereTerm *pNew;
Expr *pDup;
u16 eExtraOp = 0; /* Extra bits for pNew->eOperator */
+ assert( pTerm->iField==0 );
if( pTerm->leftCursor>=0 ){
int idxNew;
pDup = sqlite3ExprDup(db, pExpr, 0);