diff options
author | drh <drh@noemail.net> | 2009-03-02 01:22:40 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2009-03-02 01:22:40 +0000 |
commit | d742bb78f82cd8b5436056dd30eefeaea5ac85e0 (patch) | |
tree | 6adff273218eb9bbc0cc46a8dc108b5dce8474e3 /src/resolve.c | |
parent | d43fe20bc901dbb0537414b60c4df3c1886e94ac (diff) | |
download | sqlite-d742bb78f82cd8b5436056dd30eefeaea5ac85e0.tar.gz sqlite-d742bb78f82cd8b5436056dd30eefeaea5ac85e0.zip |
Fix a bug in the GROUP BY alias name resolution. The bug was by
check-in (6305). Discovered by regression test on 64-bit linux.
Test cases added so that the problems is detected on 32-bit systems. (CVS 6332)
FossilOrigin-Name: fa0008502ec4f891bfed4a11f01650d274f95c44
Diffstat (limited to 'src/resolve.c')
-rw-r--r-- | src/resolve.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve.c b/src/resolve.c index 749e473d4..81180df9e 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.18 2009/02/24 10:14:40 danielk1977 Exp $ +** $Id: resolve.c,v 1.19 2009/03/02 01:22:40 drh Exp $ */ #include "sqliteInt.h" #include <stdlib.h> @@ -65,6 +65,7 @@ static void resolveAlias( db = pParse->db; pDup = sqlite3ExprDup(db, pOrig, 0); if( pDup==0 ) return; + sqlite3TokenCopy(db, &pDup->token, &pOrig->token); if( pDup->op!=TK_COLUMN && zType[0]!='G' ){ pDup = sqlite3PExpr(pParse, TK_AS, pDup, 0, 0); if( pDup==0 ) return; |