mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix a crash that could occur if a sub-select inside an EXISTS expression features an ORDER BY clause containing one or more window functions.
FossilOrigin-Name: 9768e7db624fbfe688d61ac06bffca14a169d439d8f65f5a14529af5660d3d2e
This commit is contained in:
@@ -85,12 +85,16 @@ static void clearSelect(sqlite3 *db, Select *p, int bFree){
|
||||
sqlite3ExprDelete(db, p->pHaving);
|
||||
sqlite3ExprListDelete(db, p->pOrderBy);
|
||||
sqlite3ExprDelete(db, p->pLimit);
|
||||
if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
if( OK_IF_ALWAYS_TRUE(p->pWinDefn) ){
|
||||
sqlite3WindowListDelete(db, p->pWinDefn);
|
||||
}
|
||||
while( p->pWin ){
|
||||
assert( p->pWin->ppThis==&p->pWin );
|
||||
sqlite3WindowUnlinkFromSelect(p->pWin);
|
||||
}
|
||||
#endif
|
||||
if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
|
||||
if( bFree ) sqlite3DbFreeNN(db, p);
|
||||
p = pPrior;
|
||||
bFree = 1;
|
||||
|
||||
Reference in New Issue
Block a user