1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Fix bugs introduced by checkin (2656) and do some modest code enhancements. (CVS 2657)

FossilOrigin-Name: 7b56763a8b514834198d2392639d6d726b17d901
This commit is contained in:
drh
2005-09-05 20:06:49 +00:00
parent c092998715
commit d81bd4e209
6 changed files with 22 additions and 21 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.223 2005/09/01 03:07:44 drh Exp $
** $Id: expr.c,v 1.224 2005/09/05 20:06:49 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -2078,7 +2078,6 @@ static int analyzeAggregate(void *pArg, Expr *pExpr){
NameContext *pNC = (NameContext *)pArg;
Parse *pParse = pNC->pParse;
SrcList *pSrcList = pNC->pSrcList;
Expr *pAggExpr;
switch( pExpr->op ){
case TK_COLUMN: {
@@ -2086,9 +2085,10 @@ static int analyzeAggregate(void *pArg, Expr *pExpr){
if( pExpr->iTable==pSrcList->a[i].iCursor ){
pAgg = pParse->aAgg;
for(i=0; i<pParse->nAgg; i++, pAgg++){
Expr *pE;
if( pAgg->isAgg ) continue;
if( (pAggExpr = pAgg->pExpr)->iTable==pExpr->iTable
&& pAggExpr->iColumn==pExpr->iColumn ){
pE = pAgg->pExpr;
if( pE->iTable==pExpr->iTable && pE->iColumn==pExpr->iColumn ){
break;
}
}