aboutsummaryrefslogtreecommitdiff
path: root/src/whereexpr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/whereexpr.c')
-rw-r--r--src/whereexpr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/whereexpr.c b/src/whereexpr.c
index ea174e1f3..7daf7508c 100644
--- a/src/whereexpr.c
+++ b/src/whereexpr.c
@@ -111,8 +111,11 @@ static int allowedOp(int op){
** are converted into "Y op X".
*/
static u16 exprCommute(Parse *pParse, Expr *pExpr){
- if( sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight) !=
- sqlite3BinaryCompareCollSeq(pParse, pExpr->pRight, pExpr->pLeft) ){
+ if( pExpr->pLeft->op==TK_VECTOR
+ || pExpr->pRight->op==TK_VECTOR
+ || sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight) !=
+ sqlite3BinaryCompareCollSeq(pParse, pExpr->pRight, pExpr->pLeft)
+ ){
pExpr->flags ^= EP_Commuted;
}
SWAP(Expr*,pExpr->pRight,pExpr->pLeft);