In expr.c, around line 2253, there is a nested loop which reads:
switch( pExpr->op ){
case TK_AGG_COLUMN:
case TK_COLUMN: {
/* Check to see if the column is in one of the tables in the FROM
** clause of the aggregate query */
if( pSrcList ){
struct SrcList_item *pItem = pSrcList->a;
for(i=0; inSrc; i++, pItem++){
struct AggInfo_col *pCol;
if( pExpr->iTable==pItem->iCursor ){
/* If we reach this point, it means that pExpr refers to a
table
** that is in the FROM clause of the aggregate query.
**
** Make an entry for the column in pAggInfo->aCol[] if there
** is not an entry there already.
*/
pCol = pAggInfo->aCol;
for(i=0; inSrc; i++, pItem++){
if( pCol->iTable==pExpr->iTable &&
pCol->iColumn==pExpr->iColumn ){
break;
}
}
if( i>=pAggInfo->nColumn && (i =
addAggInfoColumn(pAggInfo))>=0 ){
In this final line, which loop variable does the i refer to?
the first one: for(i=0; inSrc; i++, pItem++){
Or then next : for(i=0; inSrc; i++, pItem++){
are the two "i" the same variable, and it is intended that the second
loop reset the
Outer loop variable each time the inner loop is run, and that the
assignment statement affect the outer loop as well?
Thanks for the clarification,
Noah Hart
CONFIDENTIALITY NOTICE:
This message may contain confidential and/or privileged information. If you are
not the addressee or authorized to receive this for the addressee, you must not
use, copy, disclose, or take any action based on this message or any
information herein. If you have received this message in error, please advise
the sender immediately by reply e-mail and delete this message. Thank you for
your cooperation.
-
To unsubscribe, send email to [EMAIL PROTECTED]
-