mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Avoid deleting expression nodes in the flattener code, as they may be referenced by AggInfo objects further up the stack.
FossilOrigin-Name: cc1fffdeddf422404170fa163ab80372ae58b444d7012b2c164021b221709b3e
This commit is contained in:
@@ -4115,7 +4115,13 @@ static int flattenSubquery(
|
||||
if( isLeftJoin>0 ){
|
||||
sqlite3SetJoinExpr(pWhere, iNewParent);
|
||||
}
|
||||
pParent->pWhere = sqlite3ExprAnd(pParse, pWhere, pParent->pWhere);
|
||||
if( pWhere ){
|
||||
if( pParent->pWhere ){
|
||||
pParent->pWhere = sqlite3PExpr(pParse, TK_AND, pWhere, pParent->pWhere);
|
||||
}else{
|
||||
pParent->pWhere = pWhere;
|
||||
}
|
||||
}
|
||||
if( db->mallocFailed==0 ){
|
||||
SubstContext x;
|
||||
x.pParse = pParse;
|
||||
|
||||
Reference in New Issue
Block a user