mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Previous check-in to fix [b47e3627ecaadbde] was incomplete. This check-in
completes the fix and adds a test cases. FossilOrigin-Name: c7da1c01f1f239e68c2173ac5748b8c5798271e43bdcee68f51f97cd0ca92bd5
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user