mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
In the push-down optimization, do not substitute columns that have previously
been identified as being constant by the propagate-constants optimization. Fix for ticket [51166be0159fd2ce] FossilOrigin-Name: 70c44811d12f540d4ec1c29dedbe999cf79b82e326a8712ae2fa0725d6bd8a65
This commit is contained in:
@@ -3476,7 +3476,10 @@ static Expr *substExpr(
|
||||
){
|
||||
pExpr->iRightJoinTable = pSubst->iNewTable;
|
||||
}
|
||||
if( pExpr->op==TK_COLUMN && pExpr->iTable==pSubst->iTable ){
|
||||
if( pExpr->op==TK_COLUMN
|
||||
&& pExpr->iTable==pSubst->iTable
|
||||
&& !ExprHasProperty(pExpr, EP_FixedCol)
|
||||
){
|
||||
if( pExpr->iColumn<0 ){
|
||||
pExpr->op = TK_NULL;
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user