1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Minor optimization to opcode comparison logic in the fixes to

the constant-propagation optimization on this branch.

FossilOrigin-Name: f17dec40a0ccc044bd32e035fc10797552329af242408a45f36125ed8d2ef088
This commit is contained in:
drh
2021-05-26 19:52:21 +00:00
parent c3b48848b3
commit a8ed515400
3 changed files with 13 additions and 13 deletions

View File

@@ -4557,12 +4557,12 @@ static int propagateConstantExprRewriteOne(
*/
static int propagateConstantExprRewrite(Walker *pWalker, Expr *pExpr){
WhereConst *pConst = pWalker->u.pConst;
assert( TK_GT==TK_EQ+1 );
assert( TK_LE==TK_EQ+2 );
assert( TK_LT==TK_EQ+3 );
assert( TK_GE==TK_EQ+4 );
if( pConst->bHasAffBlob ){
if( pExpr->op==TK_EQ
|| pExpr->op==TK_LE
|| pExpr->op==TK_GE
|| pExpr->op==TK_LT
|| pExpr->op==TK_GT
if( (pExpr->op>=TK_EQ && pExpr->op<=TK_GE)
|| pExpr->op==TK_IS
){
propagateConstantExprRewriteOne(pConst, pExpr->pLeft, 0);