mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Defer deleting subqueries in the compound-SELECT code generator until the
end of code generation, in order to avoid deleting expressions out from under the aggregation function sanity checking assert()s that occur near the end of SELECT code generation. This fixes the assertion fault described by [forum:/forumpost/cfcb4b461d|forum post cfcb4b461d]. FossilOrigin-Name: 600f1991e5c0a5d89cd8776a157b6fd72c7489791085876925e8dd7ab146fe1f
This commit is contained in:
@@ -3015,7 +3015,11 @@ static int multiSelect(
|
||||
multi_select_end:
|
||||
pDest->iSdst = dest.iSdst;
|
||||
pDest->nSdst = dest.nSdst;
|
||||
sqlite3SelectDelete(db, pDelete);
|
||||
if( pDelete ){
|
||||
sqlite3ParserAddCleanup(pParse,
|
||||
(void(*)(sqlite3*,void*))sqlite3SelectDelete,
|
||||
pDelete);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
#endif /* SQLITE_OMIT_COMPOUND_SELECT */
|
||||
|
||||
Reference in New Issue
Block a user