aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/where.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/where.c b/src/where.c
index b961417be..0b516a672 100644
--- a/src/where.c
+++ b/src/where.c
@@ -3564,14 +3564,11 @@ static void wherePartIdxExpr(
Expr *pRight = pPart->pRight;
u8 aff;
- if( pRight->op==TK_COLUMN ){
- SWAP(Expr*, pLeft, pRight);
- }
-
+ assert( pRight->op!=TK_COLUMN );
if( pLeft->op!=TK_COLUMN ) return;
if( !sqlite3ExprIsConstant(pRight) ) return;
if( !sqlite3IsBinary(sqlite3ExprCompareCollSeq(pParse, pPart)) ) return;
- if( pLeft->iColumn<0 ) return;
+ if( NEVER(pLeft->iColumn<0) ) return;
aff = pIdx->pTable->aCol[pLeft->iColumn].affinity;
if( aff>=SQLITE_AFF_TEXT ){
if( pItem ){