/ Check-in [0d7e150e]
Login

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

Overview
Comment:Finish incomplete edit of resolve.c from check-in (5998). (CVS 6000)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0d7e150e8c6cb801e68273c9d0793ce31d1f31fd
User & Date: drh 2008-12-09 14:03:22
Context
2008-12-09
14:46
Return an appropriate out-of-memory message when sqlite3_errmsg() is called following an SQLITE_NOMEM error. (CVS 6001) check-in: 228ebe41 user: drh tags: trunk
14:03
Finish incomplete edit of resolve.c from check-in (5998). (CVS 6000) check-in: 0d7e150e user: drh tags: trunk
13:12
Additional test cases for nested subqueries in a WHERE clause. (CVS 5999) check-in: 4f10f19d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/resolve.c.

    10     10   **
    11     11   *************************************************************************
    12     12   **
    13     13   ** This file contains routines used for walking the parser tree and
    14     14   ** resolve all identifiers by associating them with a particular
    15     15   ** table and column.
    16     16   **
    17         -** $Id: resolve.c,v 1.12 2008/12/09 13:04:29 drh Exp $
           17  +** $Id: resolve.c,v 1.13 2008/12/09 14:03:22 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include <stdlib.h>
    21     21   #include <string.h>
    22     22   
    23     23   /*
    24     24   ** Turn the pExpr expression into an alias for the iCol-th column of the
................................................................................
   959    959       /* Recursively resolve names in all subqueries
   960    960       */
   961    961       for(i=0; i<p->pSrc->nSrc; i++){
   962    962         struct SrcList_item *pItem = &p->pSrc->a[i];
   963    963         if( pItem->pSelect ){
   964    964           const char *zSavedContext = pParse->zAuthContext;
   965    965           if( pItem->zName ) pParse->zAuthContext = pItem->zName;
   966         -        sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC /*&sNC*/);
          966  +        sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC);
   967    967           pParse->zAuthContext = zSavedContext;
   968    968           if( pParse->nErr || db->mallocFailed ) return WRC_Abort;
   969    969         }
   970    970       }
   971    971     
   972    972       /* If there are no aggregate functions in the result-set, and no GROUP BY 
   973    973       ** expression, do not allow aggregates in any of the other expressions.