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

A bug report coming from from Firefox

([https://bugzilla.mozilla.org/show_bug.cgi?id=840377])
describes an infinite recursion.  We are unable to reproduce the problem.
Nevertheless, this check-in should prevent the problem from ever occurring
again.

FossilOrigin-Name: b7222a2bd035e7a32dc9416b25a488d9d017aad1
This commit is contained in:
drh
2013-02-12 22:09:48 +00:00
parent a173eab75f
commit 785097da6b
3 changed files with 11 additions and 9 deletions

View File

@@ -3298,14 +3298,15 @@ static int selectExpander(Walker *pWalker, Select *p){
struct SrcList_item *pFrom;
sqlite3 *db = pParse->db;
Expr *pE, *pRight, *pExpr;
u16 selFlags = p->selFlags;
p->selFlags |= SF_Expanded;
if( db->mallocFailed ){
return WRC_Abort;
}
if( NEVER(p->pSrc==0) || (p->selFlags & SF_Expanded)!=0 ){
if( NEVER(p->pSrc==0) || (selFlags & SF_Expanded)!=0 ){
return WRC_Prune;
}
p->selFlags |= SF_Expanded;
pTabList = p->pSrc;
pEList = p->pEList;
@@ -3666,6 +3667,7 @@ void sqlite3SelectPrep(
sqlite3 *db;
if( NEVER(p==0) ) return;
db = pParse->db;
if( db->mallocFailed ) return;
if( p->selFlags & SF_HasTypeInfo ) return;
sqlite3SelectExpand(pParse, p);
if( pParse->nErr || db->mallocFailed ) return;