-C Add\sexplicit\scasts\sto\ssilence\snuisance\swarnings\sfrom\sVC++.\s(CVS\s6004)
-D 2008-12-10T16:45:51
+C Remove\sor\srename\slocal\svariables\sthat\sshadow\sother\svariables\sor\sparameters.\s(CVS\s6005)
+D 2008-12-10T17:20:00
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in f7e4c81c347b04f7b0f1c1b081a168645d7b8af7
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/btree.c ba7baa987f9723882ef4655886327622e02a497f
F src/btree.h 179c3ea813780df78a289a8f5130db18e6d4616e
F src/btreeInt.h 7ef2c872371d7508657f8d7a4efe651c741d6ee6
-F src/build.c ce642b06016d94b0dbc34d379bac82b597baf8d5
+F src/build.c 01919ad8f5d259b534e04896454e3ed5a344074f
F src/callback.c e970e5beddbdb23f89a6d05cb1a6419d9f755624
F src/complete.c cb14e06dbe79dee031031f0d9e686ff306afe07c
F src/date.c 80b158ab6d14f07bc81df8415c5ab2c477947d42
F src/hash.c 582c00618efe2051785e66ba1b6430d5a129de3f
F src/hash.h 28f38ebb1006a5beedcb013bcdfe31befe7437ae
F src/hwtime.h 4a1d45f4cae1f402ea19686acf24acf4f0cb53cb
-F src/insert.c 73c4b33767d9540f8ead5d903504ed93f48ad147
+F src/insert.c 665a0e747044b39e87ed42989e9514ac9e16accd
F src/journal.c cffd2cd214e58c0e99c3ff632b3bee6c7cbb260e
F src/legacy.c aac57bd984e666059011ea01ec4383892a253be3
F src/loadext.c 2f53996c693a347edc2d773e9217dde49d96ae64
F src/pcache.c 16dc8da6e6ba6250f8dfd9ee46036db1cbceedc6
F src/pcache.h f20c3e82dd6da622c3fe296170cb1801f9a2d75a
F src/pcache1.c fb6cf5b80996ed316842d25005f4981bef7ce548
-F src/pragma.c 539e28c90e782fa909a3b3a6849d18a9eb11a548
-F src/prepare.c fcadb25d2ad722d87103517333c825b56b79a770
+F src/pragma.c 88050d5afa74fcae1bb260311fe05918f04bc8a5
+F src/prepare.c 26808c3d6ad2cd85a67969b14fd77bfbe92aaffb
F src/printf.c e29d9475c63e1dbfae005b98da3a60e07b5c1ca5
F src/random.c 67bf41b20f1983a0e481e7abb98d64704ee26884
F src/resolve.c 6dd09880a8a9b74f5bc1aa2ae4247b1afe6acd65
F src/rowset.c 2256fa4a928f750e2f3d6fc733523034beceb1d6
-F src/select.c 1d3616e4e48f6c15a0c69bf14bc5423f31624f87
+F src/select.c e5b3b244e349cc42401fb62a6c14ea09ea46403c
F src/shell.c 484bddeefac9314be18d4a60d401e93848274ee8
F src/sqlite.h.in 619a82b485fbf02276ecb8b1cc629f0c8bcda4ca
F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
F src/vdbe.h 03516f28bf5aca00a53c4dccd6c313f96adb94f6
F src/vdbeInt.h e6e80a99ce634983b7cc2498843b4d2e5540900a
F src/vdbeapi.c 20722164e7701a0747eaea03cddbbe0de5cb37bf
-F src/vdbeaux.c bdf1b3cdf97692eedd4ab4d60510531ab3019683
+F src/vdbeaux.c 2b7bfb736a9ad9f48b82149a47c8f430e5df730a
F src/vdbeblob.c b0dcebfafedcf9c0addc7901ad98f6f986c08935
F src/vdbemem.c 15dc139e0b9e328e63971e02a7552e8da73b16e8
-F src/vtab.c 02c51eac45dbff1a1d6e73f58febf92ecb563f7f
+F src/vtab.c c4bd078008a7d031f2d88c8a5b67a60eb5966254
F src/walker.c 488c2660e13224ff70c0c82761118efb547f8f0d
F src/where.c c5a21be6d5705d1c2c6f5d56a97785e4752791d2
F tclinstaller.tcl 4356d9d94d2b5ed5e68f9f0c80c4df3048dd7617
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 18bbcafc16bb985a7c74e07ffb9c4f28273a7cfd
-R 16b9d8cfa7d0b4c8f37a0a76a742de3d
+P da1cbfa766f7f379c01f4ac9c1210462d8d7c590
+R a2d9934353d665c83ba1bf37542e5a35
U drh
-Z 23fbcb130f7b999f989b3af42a01d87f
+Z 8d8b858819df06179da86dc62696f90a
-da1cbfa766f7f379c01f4ac9c1210462d8d7c590
\ No newline at end of file
+e7e9fa4fa1b7fc0668f4e3a51873ee5d11893f42
\ No newline at end of file
** COMMIT
** ROLLBACK
**
-** $Id: build.c,v 1.504 2008/12/05 15:24:16 drh Exp $
+** $Id: build.c,v 1.505 2008/12/10 17:20:00 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
#ifndef SQLITE_OMIT_VIRTUALTABLE
if( IsVirtual(pTab) ){
- Vdbe *v = sqlite3GetVdbe(pParse);
if( v ){
sqlite3VdbeAddOp0(v, OP_VBegin);
}
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
-** $Id: insert.c,v 1.253 2008/11/19 09:05:27 danielk1977 Exp $
+** $Id: insert.c,v 1.254 2008/12/10 17:20:00 drh Exp $
*/
#include "sqliteInt.h"
** goto L
** M: ...
*/
- int regRec; /* Register to hold packed record */
- int regRowid; /* Register to hold temp table ROWID */
- int addrTop; /* Label "L" */
- int addrIf; /* Address of jump to M */
+ int regRec; /* Register to hold packed record */
+ int regTempRowid; /* Register to hold temp table ROWID */
+ int addrTop; /* Label "L" */
+ int addrIf; /* Address of jump to M */
srcTab = pParse->nTab++;
regRec = sqlite3GetTempReg(pParse);
- regRowid = sqlite3GetTempReg(pParse);
+ regTempRowid = sqlite3GetTempReg(pParse);
sqlite3VdbeAddOp2(v, OP_OpenEphemeral, srcTab, nColumn);
addrTop = sqlite3VdbeAddOp1(v, OP_Yield, dest.iParm);
addrIf = sqlite3VdbeAddOp1(v, OP_If, regEof);
sqlite3VdbeAddOp3(v, OP_MakeRecord, regFromSelect, nColumn, regRec);
- sqlite3VdbeAddOp2(v, OP_NewRowid, srcTab, regRowid);
- sqlite3VdbeAddOp3(v, OP_Insert, srcTab, regRec, regRowid);
+ sqlite3VdbeAddOp2(v, OP_NewRowid, srcTab, regTempRowid);
+ sqlite3VdbeAddOp3(v, OP_Insert, srcTab, regRec, regTempRowid);
sqlite3VdbeAddOp2(v, OP_Goto, 0, addrTop);
sqlite3VdbeJumpHere(v, addrIf);
sqlite3ReleaseTempReg(pParse, regRec);
- sqlite3ReleaseTempReg(pParse, regRowid);
+ sqlite3ReleaseTempReg(pParse, regTempRowid);
}
}else{
/* This is the case if the data for the INSERT is coming from a VALUES
/* If this is not a view, open the table and and all indices */
if( !isView ){
int nIdx;
- int i;
baseCur = pParse->nTab;
nIdx = sqlite3OpenTableAndIndices(pParse, pTab, baseCur, OP_OpenWrite);
*/
endOfLoop = sqlite3VdbeMakeLabel(v);
if( triggers_exist & TRIGGER_BEFORE ){
- int regRowid;
+ int regTrigRowid;
int regCols;
int regRec;
** we do not know what the unique ID will be (because the insert has
** not happened yet) so we substitute a rowid of -1
*/
- regRowid = sqlite3GetTempReg(pParse);
+ regTrigRowid = sqlite3GetTempReg(pParse);
if( keyColumn<0 ){
- sqlite3VdbeAddOp2(v, OP_Integer, -1, regRowid);
+ sqlite3VdbeAddOp2(v, OP_Integer, -1, regTrigRowid);
}else if( useTempTable ){
- sqlite3VdbeAddOp3(v, OP_Column, srcTab, keyColumn, regRowid);
+ sqlite3VdbeAddOp3(v, OP_Column, srcTab, keyColumn, regTrigRowid);
}else{
int j1;
assert( pSelect==0 ); /* Otherwise useTempTable is true */
- sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regRowid);
- j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid);
- sqlite3VdbeAddOp2(v, OP_Integer, -1, regRowid);
+ sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regTrigRowid);
+ j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regTrigRowid);
+ sqlite3VdbeAddOp2(v, OP_Integer, -1, regTrigRowid);
sqlite3VdbeJumpHere(v, j1);
- sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid);
+ sqlite3VdbeAddOp1(v, OP_MustBeInt, regTrigRowid);
}
/* Cannot have triggers on a virtual table. If it were possible,
if( !isView ){
sqlite3TableAffinityStr(v, pTab);
}
- sqlite3VdbeAddOp3(v, OP_Insert, newIdx, regRec, regRowid);
+ sqlite3VdbeAddOp3(v, OP_Insert, newIdx, regRec, regTrigRowid);
sqlite3ReleaseTempReg(pParse, regRec);
- sqlite3ReleaseTempReg(pParse, regRowid);
+ sqlite3ReleaseTempReg(pParse, regTrigRowid);
sqlite3ReleaseTempRange(pParse, regCols, pTab->nCol);
/* Fire BEFORE or INSTEAD OF triggers */
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
-** $Id: pragma.c,v 1.195 2008/11/21 00:10:35 aswift Exp $
+** $Id: pragma.c,v 1.196 2008/12/10 17:20:01 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
** Return the number of pages in the specified database.
*/
if( sqlite3StrICmp(zLeft,"page_count")==0 ){
- Vdbe *v;
int iReg;
- v = sqlite3GetVdbe(pParse);
if( !v || sqlite3ReadSchema(pParse) ) goto pragma_out;
sqlite3CodeVerifySchema(pParse, iDb);
iReg = ++pParse->nMem;
"unlocked", "shared", "reserved", "pending", "exclusive"
};
int i;
- Vdbe *v = sqlite3GetVdbe(pParse);
sqlite3VdbeSetNumCols(v, 2);
pParse->nMem = 2;
sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "database", SQLITE_STATIC);
** interface, and routines that contribute to loading the database schema
** from disk.
**
-** $Id: prepare.c,v 1.101 2008/11/19 16:52:44 danielk1977 Exp $
+** $Id: prepare.c,v 1.102 2008/12/10 17:20:01 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
for(i=0; i<db->nDb; i++) {
Btree *pBt = db->aDb[i].pBt;
if( pBt ){
- int rc;
rc = sqlite3BtreeSchemaLocked(pBt);
if( rc ){
const char *zDb = db->aDb[i].zName;
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
-** $Id: select.c,v 1.490 2008/12/06 16:10:42 drh Exp $
+** $Id: select.c,v 1.491 2008/12/10 17:20:01 drh Exp $
*/
#include "sqliteInt.h"
int nColumn, /* Number of columns of data */
SelectDest *pDest /* Write the sorted results here */
){
- int brk = sqlite3VdbeMakeLabel(v);
- int cont = sqlite3VdbeMakeLabel(v);
+ int addrBreak = sqlite3VdbeMakeLabel(v); /* Jump here to exit loop */
+ int addrContinue = sqlite3VdbeMakeLabel(v); /* Jump here for next cycle */
int addr;
int iTab;
int pseudoTab = 0;
sqlite3VdbeAddOp2(v, OP_SetNumColumns, 0, nColumn);
sqlite3VdbeAddOp2(v, OP_OpenPseudo, pseudoTab, eDest==SRT_Output);
}
- addr = 1 + sqlite3VdbeAddOp2(v, OP_Sort, iTab, brk);
- codeOffset(v, p, cont);
+ addr = 1 + sqlite3VdbeAddOp2(v, OP_Sort, iTab, addrBreak);
+ codeOffset(v, p, addrContinue);
regRow = sqlite3GetTempReg(pParse);
regRowid = sqlite3GetTempReg(pParse);
sqlite3VdbeAddOp3(v, OP_Column, iTab, pOrderBy->nExpr + 1, regRow);
/* The bottom of the loop
*/
- sqlite3VdbeResolveLabel(v, cont);
+ sqlite3VdbeResolveLabel(v, addrContinue);
sqlite3VdbeAddOp2(v, OP_Next, iTab, addr);
- sqlite3VdbeResolveLabel(v, brk);
+ sqlite3VdbeResolveLabel(v, addrBreak);
if( eDest==SRT_Output || eDest==SRT_Coroutine ){
sqlite3VdbeAddOp2(v, OP_Close, pseudoTab, 0);
}
-
}
/*
int *pnCol, /* Write the number of columns here */
Column **paCol /* Write the new column list here */
){
- sqlite3 *db = pParse->db;
- int i, j, cnt;
- Column *aCol, *pCol;
- int nCol;
- Expr *p;
- char *zName;
- int nName;
+ sqlite3 *db = pParse->db; /* Database connection */
+ int i, j; /* Loop counters */
+ int cnt; /* Index added to make the name unique */
+ Column *aCol, *pCol; /* For looping over result columns */
+ int nCol; /* Number of columns in the result set */
+ Expr *p; /* Expression for a single result column */
+ char *zName; /* Column name */
+ int nName; /* Size of name in zName[] */
*pnCol = nCol = pEList->nExpr;
aCol = *paCol = sqlite3DbMallocZero(db, sizeof(aCol[0])*nCol);
/* If the column contains an "AS <name>" phrase, use <name> as the name */
zName = sqlite3DbStrDup(db, zName);
}else{
- Expr *pCol = p;
- Table *pTab;
- while( pCol->op==TK_DOT ) pCol = pCol->pRight;
- if( pCol->op==TK_COLUMN && (pTab = pCol->pTab)!=0 ){
+ Expr *pColExpr = p; /* The expression that is the result column name */
+ Table *pTab; /* Table associated with this expression */
+ while( pColExpr->op==TK_DOT ) pColExpr = pColExpr->pRight;
+ if( pColExpr->op==TK_COLUMN && (pTab = pColExpr->pTab)!=0 ){
/* For columns use the column name name */
- int iCol = pCol->iColumn;
+ int iCol = pColExpr->iColumn;
if( iCol<0 ) iCol = pTab->iPKey;
zName = sqlite3MPrintf(db, "%s",
iCol>=0 ? pTab->aCol[iCol].zName : "rowid");
}else{
/* Use the original text of the column expression as its name */
- Token *pToken = (pCol->span.z?&pCol->span:&pCol->token);
+ Token *pToken = (pColExpr->span.z?&pColExpr->span:&pColExpr->token);
zName = sqlite3MPrintf(db, "%T", pToken);
}
}
pCol->zName = zName;
}
if( db->mallocFailed ){
- int j;
for(j=0; j<i; j++){
sqlite3DbFree(db, aCol[j].zName);
}
** GROUP BY clause.
*/
if( pGroupBy ){
- int i; /* Loop counter */
+ int k; /* Loop counter */
struct ExprList_item *pItem; /* For looping over expression in a list */
- for(i=p->pEList->nExpr, pItem=p->pEList->a; i>0; i--, pItem++){
+ for(k=p->pEList->nExpr, pItem=p->pEList->a; k>0; k--, pItem++){
pItem->iAlias = 0;
}
- for(i=pGroupBy->nExpr, pItem=pGroupBy->a; i>0; i--, pItem++){
+ for(k=pGroupBy->nExpr, pItem=pGroupBy->a; k>0; k--, pItem++){
pItem->iAlias = 0;
}
}
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
-** $Id: vdbeaux.c,v 1.424 2008/12/09 02:51:24 drh Exp $
+** $Id: vdbeaux.c,v 1.425 2008/12/10 17:20:01 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
/* Select a master journal file name */
do {
- u32 random;
+ u32 iRandom;
sqlite3DbFree(db, zMaster);
- sqlite3_randomness(sizeof(random), &random);
- zMaster = sqlite3MPrintf(db, "%s-mj%08X", zMainFile, random&0x7fffffff);
+ sqlite3_randomness(sizeof(iRandom), &iRandom);
+ zMaster = sqlite3MPrintf(db, "%s-mj%08X", zMainFile, iRandom&0x7fffffff);
if( !zMaster ){
return SQLITE_NOMEM;
}
*************************************************************************
** This file contains code used to help implement virtual tables.
**
-** $Id: vtab.c,v 1.78 2008/11/13 19:12:36 danielk1977 Exp $
+** $Id: vtab.c,v 1.79 2008/12/10 17:20:01 drh Exp $
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
#include "sqliteInt.h"
Table *pTab;
sqlite3_vtab *pVtab;
sqlite3_module *pMod;
- void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
- void *pArg;
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**) = 0;
+ void *pArg = 0;
FuncDef *pNew;
int rc = 0;
char *zLowerName;