зеркало из https://github.com/mozilla/gecko-dev.git
Bug 840377 - Prevent an infinite recursion in SQLite. r=drh, a=overholt
This commit is contained in:
Родитель
edb4268730
Коммит
430b7a4cda
|
@ -96785,14 +96785,15 @@ static int selectExpander(Walker *pWalker, Select *p){
|
||||||
ExprList *pEList;
|
ExprList *pEList;
|
||||||
struct SrcList_item *pFrom;
|
struct SrcList_item *pFrom;
|
||||||
sqlite3 *db = pParse->db;
|
sqlite3 *db = pParse->db;
|
||||||
|
u16 selFlags = p->selFlags;
|
||||||
|
|
||||||
|
p->selFlags |= SF_Expanded;
|
||||||
if( db->mallocFailed ){
|
if( db->mallocFailed ){
|
||||||
return WRC_Abort;
|
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;
|
return WRC_Prune;
|
||||||
}
|
}
|
||||||
p->selFlags |= SF_Expanded;
|
|
||||||
pTabList = p->pSrc;
|
pTabList = p->pSrc;
|
||||||
pEList = p->pEList;
|
pEList = p->pEList;
|
||||||
|
|
||||||
|
@ -97112,6 +97113,7 @@ SQLITE_PRIVATE void sqlite3SelectPrep(
|
||||||
sqlite3 *db;
|
sqlite3 *db;
|
||||||
if( NEVER(p==0) ) return;
|
if( NEVER(p==0) ) return;
|
||||||
db = pParse->db;
|
db = pParse->db;
|
||||||
|
if( db->mallocFailed ) return;
|
||||||
if( p->selFlags & SF_HasTypeInfo ) return;
|
if( p->selFlags & SF_HasTypeInfo ) return;
|
||||||
sqlite3SelectExpand(pParse, p);
|
sqlite3SelectExpand(pParse, p);
|
||||||
if( pParse->nErr || db->mallocFailed ) return;
|
if( pParse->nErr || db->mallocFailed ) return;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче