diff options
author | drh <drh@noemail.net> | 2015-04-20 01:32:53 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-04-20 01:32:53 +0000 |
commit | 850b0d031d6097e6d8a45a801b1370c61d152293 (patch) | |
tree | 34659df749c80a4ac94edbe4f1a92d122a85f64c /src/expr.c | |
parent | 10dc553c13ae43064717f173ebd7717c97fbf63b (diff) | |
parent | b496a8f547853a12c02d16cd4cfb100a3ee5ba70 (diff) | |
download | sqlite-850b0d031d6097e6d8a45a801b1370c61d152293.tar.gz sqlite-850b0d031d6097e6d8a45a801b1370c61d152293.zip |
Merge all recent trunk enhancements and fixes into the sessions branch.
FossilOrigin-Name: b8ef1cdee307441e8d97b4bfc21f8547692eea9f
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c index 77eb35aa7..3f8bd942e 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1251,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; @@ -2016,7 +2017,7 @@ int sqlite3CodeSubselect( pSel->pLimit = sqlite3PExpr(pParse, TK_INTEGER, 0, 0, &sqlite3IntTokens[1]); pSel->iLimit = 0; - pSel->selFlags &= ~SF_AllValues; + pSel->selFlags &= ~SF_MultiValue; if( sqlite3Select(pParse, pSel, &dest) ){ return 0; } @@ -4017,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; |