diff options
author | drh <> | 2023-09-26 14:57:30 +0000 |
---|---|---|
committer | drh <> | 2023-09-26 14:57:30 +0000 |
commit | a6e72026775a59ea8ab80d2ab7a4ed943343b7c2 (patch) | |
tree | 3b51b82e5bfdfa53700fa5a382a2d014b20151a4 /src | |
parent | 6f737371c0bf92e79be3cea734beb3abe4650c76 (diff) | |
download | sqlite-a6e72026775a59ea8ab80d2ab7a4ed943343b7c2.tar.gz sqlite-a6e72026775a59ea8ab80d2ab7a4ed943343b7c2.zip |
Remove unreachable code from the partial-index constant value optimization
([8d4160910d651246]).
FossilOrigin-Name: 7ad38254c37153efa72291d09800693ca60894359548eda877d59defa8c70d49
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 7 |
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 ){ |