diff options
author | dan <dan@noemail.net> | 2015-04-22 09:40:35 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2015-04-22 09:40:35 +0000 |
commit | 062c267dffc17aeea9e41c8a553bc7f20a949e04 (patch) | |
tree | 8b0be371e782c9cb20665994bb92c2ec48d27924 /src/expr.c | |
parent | 5bb97c2b801248ab08b37b99926962f7db5c0e09 (diff) | |
parent | 318d38cf7e16d0f47dc982c33e80792e06a6fff6 (diff) | |
download | sqlite-062c267dffc17aeea9e41c8a553bc7f20a949e04.tar.gz sqlite-062c267dffc17aeea9e41c8a553bc7f20a949e04.zip |
Update this branch with latest trunk changes.
FossilOrigin-Name: 9797482ded7de985e3b20aedec5e4d81f55065c8
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c index fe09b4b50..3f8bd942e 100644 --- a/src/expr.c +++ b/src/expr.c @@ -397,6 +397,7 @@ static void exprSetHeight(Expr *p){ ** Expr.flags. */ void sqlite3ExprSetHeightAndFlags(Parse *pParse, Expr *p){ + if( pParse->nErr ) return; exprSetHeight(p); sqlite3ExprCheckHeight(pParse, p->nHeight); } @@ -1250,7 +1251,8 @@ u32 sqlite3ExprListFlags(const ExprList *pList){ u32 m = 0; if( pList ){ for(i=0; i<pList->nExpr; i++){ - m |= pList->a[i].pExpr->flags; + Expr *pExpr = pList->a[i].pExpr; + if( ALWAYS(pExpr) ) m |= pList->a[i].pExpr->flags; } } return m; @@ -1690,7 +1692,7 @@ int sqlite3FindInIndex(Parse *pParse, Expr *pX, u32 inFlags, int *prRhsHasNull){ ** ephemeral table. */ p = (ExprHasProperty(pX, EP_xIsSelect) ? pX->x.pSelect : 0); - if( ALWAYS(pParse->nErr==0) && isCandidateForInOpt(p) ){ + if( pParse->nErr==0 && isCandidateForInOpt(p) ){ sqlite3 *db = pParse->db; /* Database connection */ Table *pTab; /* Table <table>. */ Expr *pExpr; /* Expression <column> */ @@ -2015,6 +2017,7 @@ int sqlite3CodeSubselect( pSel->pLimit = sqlite3PExpr(pParse, TK_INTEGER, 0, 0, &sqlite3IntTokens[1]); pSel->iLimit = 0; + pSel->selFlags &= ~SF_MultiValue; if( sqlite3Select(pParse, pSel, &dest) ){ return 0; } @@ -4015,7 +4018,7 @@ int sqlite3ExprCompare(Expr *pA, Expr *pB, int iTab){ if( sqlite3ExprCompare(pA->pLeft, pB->pLeft, iTab) ) return 2; if( sqlite3ExprCompare(pA->pRight, pB->pRight, iTab) ) return 2; if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2; - if( ALWAYS((combinedFlags & EP_Reduced)==0) ){ + if( ALWAYS((combinedFlags & EP_Reduced)==0) && pA->op!=TK_STRING ){ if( pA->iColumn!=pB->iColumn ) return 2; if( pA->iTable!=pB->iTable && (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2; |