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

Remove Window objects from the corresponding Select.pWin list when they are deleted.

FossilOrigin-Name: d23f33168222dfa40a67dc7de58057418151989e81429e4af47617e86db04667
This commit is contained in:
dan
2019-07-22 16:20:03 +00:00
parent fd15e18d7f
commit 75b0821e99
8 changed files with 70 additions and 53 deletions

View File

@@ -102,6 +102,7 @@ static void clearSelect(sqlite3 *db, Select *p, int bFree){
}
#endif
if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
assert( p->pWin==0 );
if( bFree ) sqlite3DbFreeNN(db, p);
p = pPrior;
bFree = 1;
@@ -5661,7 +5662,6 @@ int sqlite3Select(
pDest->eDest==SRT_DistQueue || pDest->eDest==SRT_Fifo);
/* If ORDER BY makes no difference in the output then neither does
** DISTINCT so it can be removed too. */
sqlite3WindowRemoveExprListFromSelect(p, p->pOrderBy);
sqlite3ExprListDelete(db, p->pOrderBy);
p->pOrderBy = 0;
p->selFlags &= ~SF_Distinct;