mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
Make sure the column name resolver does not try to duplicate Expr.u.zToken
when the Expr.u.iValue union member is the element being used. (CVS 6684) FossilOrigin-Name: 376ecf0d87e4a2329f5861401f83ed9ceb35d528
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
** resolve all identifiers by associating them with a particular
|
||||
** table and column.
|
||||
**
|
||||
** $Id: resolve.c,v 1.24 2009/05/28 01:00:55 drh Exp $
|
||||
** $Id: resolve.c,v 1.25 2009/05/28 12:49:53 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <stdlib.h>
|
||||
@@ -71,6 +71,8 @@ static void resolveAlias(
|
||||
pEList->a[iCol].iAlias = (u16)(++pParse->nAlias);
|
||||
}
|
||||
pDup->iTable = pEList->a[iCol].iAlias;
|
||||
}else if( ExprHasProperty(pOrig, EP_IntValue) || pOrig->u.zToken==0 ){
|
||||
pDup = sqlite3ExprDup(db, pOrig, 0);
|
||||
}else{
|
||||
char *zToken = pOrig->u.zToken;
|
||||
pOrig->u.zToken = 0;
|
||||
|
||||
Reference in New Issue
Block a user