-C Make\ssure\smalloc(0)\salways\sreturns\sNULL.\s\sFix\sfor\sticket\s#171.\s(CVS\s764)
-D 2002-10-20T15:46:23
+C Work\saround\sa\sbug\sin\sthe\sBorland\sC\scompiler.\s\sTicket\s#172.\s(CVS\s765)
+D 2002-10-20T15:53:04
F Makefile.in d6c9a85c2a5e696843201d090dcf8bf2f8716f2a
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/parse.y 818b03a73f6b3b8b284b515c5b1d9998d4663dc3
F src/printf.c 5c50fc1da75c8f5bf432b1ad17d91d6653acd167
F src/random.c 19e8e00fe0df32a742f115773f57651be327cabe
-F src/select.c 74a025cd6887b636fc06a79ff6246c4eb6826ec4
+F src/select.c 987e0c6134f157905f4531b4c0191ca078c81ef2
F src/shell.c 9e9a6eb6bca07f01e6472a603f908a0127ea50ff
F src/shell.tcl 27ecbd63dd88396ad16d81ab44f73e6c0ea9d20e
F src/sqlite.h.in d3999a9c6374675779058d6cfe5431131618e92b
F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P d0af59fe6b9d5d026786e7cce1c49c208a0335cc
-R 70da8919be02ff08191d05376cb545cc
+P 4622b7ce8f4727a6405ddf4f0af701db86da86bf
+R be2bc0a24e02b5cac45ad5a3ae26a77c
U drh
-Z 4581abd0f3d516911470f2cb2d447f4c
+Z 65dec2fc5948c9e002373b1beb73bd0e
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
-** $Id: select.c,v 1.112 2002/09/08 17:23:43 drh Exp $
+** $Id: select.c,v 1.113 2002/10/20 15:53:04 drh Exp $
*/
#include "sqliteInt.h"
+
/*
** Allocate a new Select structure and return a pointer to that
** structure.
return z;
}
+/*
+** Forward declaration
+*/
+static int fillInColumnList(Parse*, Select*);
+
/*
** Given a SELECT statement, generate a Table structure that describes
** the result set of that SELECT.
Table *pTab;
int i;
ExprList *pEList;
- static int fillInColumnList(Parse*, Select*);
if( fillInColumnList(pParse, pSelect) ){
return 0;
** to a column in table number iFrom, change that reference to the
** same column in table number iTo.
*/
+static void changeTablesInList(ExprList*, int, int); /* Forward Declaration */
static void changeTables(Expr *pExpr, int iFrom, int iTo){
if( pExpr==0 ) return;
if( pExpr->op==TK_COLUMN && pExpr->iTable==iFrom ){
pExpr->iTable = iTo;
}else{
- static void changeTablesInList(ExprList*, int, int);
changeTables(pExpr->pLeft, iFrom, iTo);
changeTables(pExpr->pRight, iFrom, iTo);
changeTablesInList(pExpr->pList, iFrom, iTo);
** changes to pExpr so that it refers directly to the source table
** of the subquery rather the result set of the subquery.
*/
+static void substExprList(ExprList*,int,ExprList*,int); /* Forward Decl */
static void substExpr(Expr *pExpr, int iTable, ExprList *pEList, int iSub){
if( pExpr==0 ) return;
if( pExpr->op==TK_COLUMN && pExpr->iTable==iTable && pExpr->iColumn>=0 ){
changeTables(pExpr, iSub, iTable);
}
}else{
- static void substExprList(ExprList*,int,ExprList*,int);
substExpr(pExpr->pLeft, iTable, pEList, iSub);
substExpr(pExpr->pRight, iTable, pEList, iSub);
substExprList(pExpr->pList, iTable, pEList, iSub);