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

Fix a problem with a stale Select.pWith pointer when a CTE is used together

with a compound query and an ORDER BY clause.

FossilOrigin-Name: 9a453f52a2b30595891604ede7d4acf61c2736a1
This commit is contained in:
drh
2015-04-12 17:35:27 +00:00
parent 11b0481778
commit f932f7145e
4 changed files with 15 additions and 8 deletions

View File

@@ -3883,6 +3883,7 @@ static int convertCompoundSelectToSubquery(Walker *pWalker, Select *p){
pNew->pOrderBy = 0;
p->pPrior = 0;
p->pNext = 0;
p->pWith = 0;
p->selFlags &= ~SF_Compound;
assert( (p->selFlags & SF_Converted)==0 );
p->selFlags |= SF_Converted;