/ Check-in [b7222a2b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b7222a2bd035e7a32dc9416b25a488d9d017aad1
User & Date: drh 2013-02-12 22:09:48
Context
2013-02-12
22:20
Improve memory allocation error handling on WinCE. check-in: cdbca259 user: drh tags: trunk
22:09
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. check-in: b7222a2b user: drh tags: trunk
2013-02-11
13:47
Add extended error codes for all SQLITE_CONSTRAINT errors. check-in: 939d8282 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  3294   3294     Parse *pParse = pWalker->pParse;
  3295   3295     int i, j, k;
  3296   3296     SrcList *pTabList;
  3297   3297     ExprList *pEList;
  3298   3298     struct SrcList_item *pFrom;
  3299   3299     sqlite3 *db = pParse->db;
  3300   3300     Expr *pE, *pRight, *pExpr;
         3301  +  u16 selFlags = p->selFlags;
  3301   3302   
         3303  +  p->selFlags |= SF_Expanded;
  3302   3304     if( db->mallocFailed  ){
  3303   3305       return WRC_Abort;
  3304   3306     }
  3305         -  if( NEVER(p->pSrc==0) || (p->selFlags & SF_Expanded)!=0 ){
         3307  +  if( NEVER(p->pSrc==0) || (selFlags & SF_Expanded)!=0 ){
  3306   3308       return WRC_Prune;
  3307   3309     }
  3308         -  p->selFlags |= SF_Expanded;
  3309   3310     pTabList = p->pSrc;
  3310   3311     pEList = p->pEList;
  3311   3312   
  3312   3313     /* Make sure cursor numbers have been assigned to all entries in
  3313   3314     ** the FROM clause of the SELECT statement.
  3314   3315     */
  3315   3316     sqlite3SrcListAssignCursors(pParse, pTabList);
................................................................................
  3662   3663     Parse *pParse,         /* The parser context */
  3663   3664     Select *p,             /* The SELECT statement being coded. */
  3664   3665     NameContext *pOuterNC  /* Name context for container */
  3665   3666   ){
  3666   3667     sqlite3 *db;
  3667   3668     if( NEVER(p==0) ) return;
  3668   3669     db = pParse->db;
         3670  +  if( db->mallocFailed ) return;
  3669   3671     if( p->selFlags & SF_HasTypeInfo ) return;
  3670   3672     sqlite3SelectExpand(pParse, p);
  3671   3673     if( pParse->nErr || db->mallocFailed ) return;
  3672   3674     sqlite3ResolveSelectNames(pParse, p, pOuterNC);
  3673   3675     if( pParse->nErr || db->mallocFailed ) return;
  3674   3676     sqlite3SelectAddTypeInfo(pParse, p);
  3675   3677   }