diff options
author | drh <drh@noemail.net> | 2008-12-09 13:04:29 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-12-09 13:04:29 +0000 |
commit | 2bf90f1e64a3ef72b2d5deda424b2277fad42cfd (patch) | |
tree | 14af910bb9d3ca78dfdfd056d0024d8869be6bee /src/resolve.c | |
parent | aef3af54dd425714b80d36aabae920c87556df78 (diff) | |
download | sqlite-2bf90f1e64a3ef72b2d5deda424b2277fad42cfd.tar.gz sqlite-2bf90f1e64a3ef72b2d5deda424b2277fad42cfd.zip |
A subquery in the result set of a SELECT should be able to look into outer
queries to find variable references. But a subquery in the FROM clause
should not be able to do this. Ticket #3530. (CVS 5998)
FossilOrigin-Name: be03fa0543044dc46952695e963d9b82afed892b
Diffstat (limited to 'src/resolve.c')
-rw-r--r-- | src/resolve.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve.c b/src/resolve.c index a878b0248..7a4984cd4 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -14,7 +14,7 @@ ** resolve all identifiers by associating them with a particular ** table and column. ** -** $Id: resolve.c,v 1.11 2008/11/17 19:18:55 danielk1977 Exp $ +** $Id: resolve.c,v 1.12 2008/12/09 13:04:29 drh Exp $ */ #include "sqliteInt.h" #include <stdlib.h> @@ -963,7 +963,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){ if( pItem->pSelect ){ const char *zSavedContext = pParse->zAuthContext; if( pItem->zName ) pParse->zAuthContext = pItem->zName; - sqlite3ResolveSelectNames(pParse, pItem->pSelect, &sNC); + sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC /*&sNC*/); pParse->zAuthContext = zSavedContext; if( pParse->nErr || db->mallocFailed ) return WRC_Abort; } |