diff options
author | drh <> | 2024-03-16 19:36:18 +0000 |
---|---|---|
committer | drh <> | 2024-03-16 19:36:18 +0000 |
commit | b918a0f8215b43d62e2824dbe439261cafaf48c2 (patch) | |
tree | 1e38832c5b4a99b83e2588c43cf613eb5edff657 /src/select.c | |
parent | bf4105d76851ba3fb4ad56190284f9ebc6decfd8 (diff) | |
download | sqlite-b918a0f8215b43d62e2824dbe439261cafaf48c2.tar.gz sqlite-b918a0f8215b43d62e2824dbe439261cafaf48c2.zip |
Activate the enhanced constant-expression for the
[constant propagation optimization](/info/f4229707ac08d66c).
FossilOrigin-Name: 92afea38881a1a4f266c79ddc6e1027cf17c288dcc8f7e7d50466899ac0054c4
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/select.c b/src/select.c index bffbaa980..1085b9943 100644 --- a/src/select.c +++ b/src/select.c @@ -4776,7 +4776,7 @@ static void constInsert( ){ int i; assert( pColumn->op==TK_COLUMN ); - assert( sqlite3ExprIsConstant(0, pValue) ); + assert( sqlite3ExprIsConstant(pConst->pParse, pValue) ); if( ExprHasProperty(pColumn, EP_FixedCol) ) return; if( sqlite3ExprAffinity(pValue)!=0 ) return; @@ -4834,10 +4834,10 @@ static void findConstInWhere(WhereConst *pConst, Expr *pExpr){ pLeft = pExpr->pLeft; assert( pRight!=0 ); assert( pLeft!=0 ); - if( pRight->op==TK_COLUMN && sqlite3ExprIsConstant(0, pLeft) ){ + if( pRight->op==TK_COLUMN && sqlite3ExprIsConstant(pConst->pParse, pLeft) ){ constInsert(pConst,pRight,pLeft,pExpr); } - if( pLeft->op==TK_COLUMN && sqlite3ExprIsConstant(0, pRight) ){ + if( pLeft->op==TK_COLUMN && sqlite3ExprIsConstant(pConst->pParse, pRight) ){ constInsert(pConst,pLeft,pRight,pExpr); } } |