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

AggInfo objects might be referenced even after the sqlite3Select() function

that created them has exited.  So AggInfo cannot be a stack variable.  And it
must not be freed until the Parse object is destroyed.

FossilOrigin-Name: 3c840b4df306e2db1da08673e9ede973b4cb6d2b3f9eeeab5835e39452ee3056
This commit is contained in:
drh
2020-06-07 20:18:07 +00:00
parent 896366282d
commit bf7909734a
7 changed files with 103 additions and 84 deletions

View File

@@ -5730,7 +5730,6 @@ static int agginfoPersistExprCb(Walker *pWalker, Expr *pExpr){
int iAgg = pExpr->iAgg;
Parse *pParse = pWalker->pParse;
sqlite3 *db = pParse->db;
assert( pAggInfo->iAggMagic==AggInfoMagic );
assert( pExpr->op==TK_COLUMN || pExpr->op==TK_AGG_COLUMN
|| pExpr->op==TK_FUNCTION || pExpr->op==TK_AGG_FUNCTION );
if( pExpr->op==TK_COLUMN || pExpr->op==TK_AGG_COLUMN ){