]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a naming conflict between sqlite versions 2 and 3. An open sqlite3
authordrh <drh@noemail.net>
Mon, 6 Sep 2004 17:24:11 +0000 (17:24 +0000)
committerdrh <drh@noemail.net>
Mon, 6 Sep 2004 17:24:11 +0000 (17:24 +0000)
connection now *must* be called "sqlite3".  You cannot call it "sqlite".
This might break existing code. (CVS 1941)

FossilOrigin-Name: 3ddf5a9d1c480a2e3aa32685879063b11afddbe1

31 files changed:
manifest
manifest.uuid
src/attach.c
src/auth.c
src/build.c
src/date.c
src/delete.c
src/expr.c
src/func.c
src/insert.c
src/legacy.c
src/main.c
src/pragma.c
src/select.c
src/sqlite.h.in
src/sqliteInt.h
src/table.c
src/tclsqlite.c
src/test1.c
src/test4.c
src/tokenize.c
src/trigger.c
src/update.c
src/util.c
src/vacuum.c
src/vdbe.c
src/vdbe.h
src/vdbeInt.h
src/vdbeapi.c
src/vdbeaux.c
src/where.c

index 6b0fa6eed340e5a129b0b74721732d5af8ec2e2a..f625e1f4cf35f8fd536b2e14bec300ead0f41bf5 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Comment\schanges\sand\sminor\scode\scleanup.\s(CVS\s1940)
-D 2004-09-05T23:23:42
+C Fix\sa\snaming\sconflict\sbetween\ssqlite\sversions\s2\sand\s3.\s\sAn\sopen\ssqlite3\nconnection\snow\s*must*\sbe\scalled\s"sqlite3".\s\sYou\scannot\scall\sit\s"sqlite".\nThis\smight\sbreak\sexisting\scode.\s(CVS\s1941)
+D 2004-09-06T17:24:12
 F Makefile.in 65a7c43fcaf9a710d62f120b11b6e435eeb4a450
 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -26,21 +26,21 @@ F sqlite.1 83f4a9d37bdf2b7ef079a82d54eaf2e3509ee6ea
 F sqlite.pc.in 30552343140c53304c2a658c080fbe810cd09ca2
 F sqlite3.def 84215604aa7b547d75e0f7b437966e7ad18fa8b2
 F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
-F src/attach.c 3fe50b71cf6b324c7d217fc13742124dba726486
-F src/auth.c 60db23b98bb94c8b0178180faaf49dc116674217
+F src/attach.c e49d09dad9f5f9fb10b4b0c1be5a70ae4c45e689
+F src/auth.c 038d7c7c2224fa92f0125c0c30c90f7b2ca8c39a
 F src/btree.c fe763fde639793ef2010d5388d0d135ecc02b4eb
 F src/btree.h 94dfec0a1722d33359b23e7e310f2b64ffedf029
-F src/build.c 35275654d9c5ce6c1c0c78e391f85e6915a8a66b
-F src/date.c edff4aa851eeca8abbc737dc3933a2f0671156ce
-F src/delete.c cebfdde83e7bf68d8118e1c13e40c99787302fbf
+F src/build.c c6940e4a663fa6b7dc3dff34f7dddbc45d331d48
+F src/date.c eb8d5fa1a6d5cfc09031c8852d10ff742a94b15b
+F src/delete.c e887f44aae1e33da1643df58abe86cd9cde45ad1
 F src/encode.c a876af473d1d636faa3dca51c7571f2e007eea37
-F src/expr.c d618305952f75567514824cf9bdd5de74db5e00a
-F src/func.c 54a095713dd117e5482b25fa829e241d6938f1b6
+F src/expr.c 5b6881a229e49869c348825aa1f1af6bd6b4bc76
+F src/func.c 14bf20710a10fe66266e16da4364ca2dd8c4c36d
 F src/hash.c a97721a55440b7bea31ffe471bb2f6b4123cddd5
 F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84
-F src/insert.c fc1ce65a0fe68f226143de9b43c3582164a92aff
-F src/legacy.c 2f3617c61bcdcd1d776154a9cfebf99facda8ad8
-F src/main.c 981bbcf4521762ab9f8ecbda1a4260ef94d7234f
+F src/insert.c bfd21070c28dd94e58ae918260a6985d2b5e4477
+F src/legacy.c 1cf9a326313f99879b4970a1d454725deb12e81b
+F src/main.c ac302ed646bdb256b78c87385627b3142357eced
 F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
 F src/os.h d1780e0db95cad01f213d48da22ab490eb4fd345
 F src/os_common.h cd7eb025fdab7dc91e0e97bf6310f1648205857f
@@ -55,33 +55,33 @@ F src/os_win.h babd4e912967c6b09088cfe38a45e8005a07ba44
 F src/pager.c ae06c85de0db43f61a7a3e5eacad3fd5615daf59
 F src/pager.h 67739fe649f33be55dba522ca8a9cc4e42d14f71
 F src/parse.y 581a2ce014b843506805b2470c02b7865ad034d5
-F src/pragma.c 0fbfb50491ac971dd22c049c3042c322e9cadb39
+F src/pragma.c 6385059dfd77eee9fe7e53c0469776315f136ae0
 F src/printf.c 17b28a1eedfe8129b05de981719306c18c3f1327
 F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
-F src/select.c 14534579535579a082fda8bbc7d621d7d170f406
+F src/select.c 6e3ec12a01c6d5b51459d6ddaca36040d9e7730e
 F src/shell.c 4f1a2760ced81c829defb47b0a3b61ffec61b604
-F src/sqlite.h.in b89ced1acc705bc9c79a2a4e725ac0eb64bd0614
-F src/sqliteInt.h 71de4b0400b50579d5dfab70b59adbb7776e77d8
-F src/table.c 4521c278892f60e4d630788c0ea5cf4db1e75c49
-F src/tclsqlite.c b7dd8b3531b70188d03354db530de0f2ffcac697
-F src/test1.c 3670f318c473b5a81cae548d9cc42da3f6a6efee
+F src/sqlite.h.in 40c365c4af381fea8f103d579d4ce021c1b5fbc6
+F src/sqliteInt.h 0840e651db8e16f88f2b8a2393ac98dfdbf01df0
+F src/table.c 8168c6e824009f8485bff79fc60ea8fea6829b10
+F src/tclsqlite.c ad6460a22cee18f292614a083cd15db670298213
+F src/test1.c 0a7ae23d822177ecf3e8b577d026f0c8a39fe5c3
 F src/test2.c f4c2f3928f1998fd8cb75a81e33a60e025ea85d4
 F src/test3.c 94d0a2a90bccd85802488cb42c69ec8afd2e4646
-F src/test4.c c38766914e924091516030b6a8b677d849c08bf0
+F src/test4.c 7c6b9fc33dd1f3f93c7f1ee6e5e6d016afa6c1df
 F src/test5.c b001fa7f1b9e2dc5c2331de62fc641b5ab2bd7a1
-F src/tokenize.c 32171c3d576c7ec6acd6cf15e55c00ac0b314769
-F src/trigger.c 40e10f4b219b55e56478bc17480ce77654300e8d
-F src/update.c bbe126c67529bd699016af2d72bc4ceb8fd41527
+F src/tokenize.c 566ca7d1354dcb990475a52990056fc387d49df1
+F src/trigger.c 98dd620bebd9f3dadaacf0db3958b916cf1e7b7f
+F src/update.c 0e00300763d2ce0dbd6a0598882a5039580b225e
 F src/utf.c 328890099db492dda5620ee5f924e244c6e57ff7
-F src/util.c f53a683ff6daf25694920c42020848fc38967a8f
-F src/vacuum.c c5f11bf25e49479940133d1bb882ad2a5d6fa021
-F src/vdbe.c 45f659497b479f001c2f4e8251474aba3975b9f8
-F src/vdbe.h e081c72cd0f7c19d49b1927460aeefcf0fbc85ac
-F src/vdbeInt.h f8df57a9dc272967991f806e612628e0aa57e705
-F src/vdbeapi.c 854732720c2cfc6ff76b28eef6253ac84a5408bc
-F src/vdbeaux.c 77eaaf62b8b3acad4a2ef351e3c44ecffc67faf6
+F src/util.c dc00e84eabc09d89fec31e908306fffa3eab449b
+F src/vacuum.c 819a3f411cb8d2d714e55f0805e8c23a642dd7ba
+F src/vdbe.c b19de04c57b4136a8e0203d5e3b76dd82bded1b5
+F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181
+F src/vdbeInt.h e09362d6323a725de3c30b0cc381a691e86ed697
+F src/vdbeapi.c e3fa5b775161bc8337c20f2e46a68bb4746b2094
+F src/vdbeaux.c 4080a6162d96818f875a95ead4f67cb9ca8ecf15
 F src/vdbemem.c ef9ac7d32acfe4bce5c5b408b1294c8d9e0cdb56
-F src/where.c a84eee276cd072158224da6b5f30733df2d56027
+F src/where.c 12e214870c84546858ddb9f121165a1fbfce6811
 F test/all.test 929bfa932b55e75c96fe2203f7650ba451c1862c
 F test/attach.test feb2ce54e78688df4c84553416d5aec3b2a0112e
 F test/attach2.test 32ca2c1a5a347a7404219a11f9f84739a63d2582
@@ -248,7 +248,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25
 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P fa82becae7e41c47a6387061932f692c6f9f472e
-R edad9a6786f399b5ab4dfba836413b99
+P dfa9ea89c473e1fea804ad07e8e58a9af1e92f6c
+R d6d5fe458835a0a28a6ff1bc8acf5454
 U drh
-Z 8c9e068ca55b5659b9e57265a53ffefe
+Z eb4e97b9a729a6f470349fc7f802efa6
index d6c8183833dd05bf62848e9ff9c5b586b15e5ed6..a7dffaa7fe627dc12897458fecba0c678f7f5343 100644 (file)
@@ -1 +1 @@
-dfa9ea89c473e1fea804ad07e8e58a9af1e92f6c
\ No newline at end of file
+3ddf5a9d1c480a2e3aa32685879063b11afddbe1
\ No newline at end of file
index bd2c48f0e5989e8a9ea946b70d1a3c58b28a89f9..d20c662b999f30d9b1a24760623da249b99297ed 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code used to implement the ATTACH and DETACH commands.
 **
-** $Id: attach.c,v 1.27 2004/09/05 23:23:42 drh Exp $
+** $Id: attach.c,v 1.28 2004/09/06 17:24:12 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -33,7 +33,7 @@ void sqlite3Attach(
   Db *aNew;
   int rc, i;
   char *zFile, *zName;
-  sqlite *db;
+  sqlite3 *db;
   Vdbe *v;
 
   v = sqlite3GetVdbe(pParse);
@@ -154,7 +154,7 @@ void sqlite3Attach(
 */
 void sqlite3Detach(Parse *pParse, Token *pDbname){
   int i;
-  sqlite *db;
+  sqlite3 *db;
   Vdbe *v;
   Db *pDb = 0;
 
@@ -206,7 +206,7 @@ int sqlite3FixInit(
   const char *zType,  /* "view", "trigger", or "index" */
   const Token *pName  /* Name of the view, trigger, or index */
 ){
-  sqlite *db;
+  sqlite3 *db;
 
   if( iDb<0 || iDb==1 ) return 0;
   db = pParse->db;
index 0ac623c95789ee347a1c64bb9360cec73d34d29c..3a8c1fbc0b7941a6cb871038f7b68cab2b1daa2d 100644 (file)
@@ -14,7 +14,7 @@
 ** systems that do not need this facility may omit it by recompiling
 ** the library with -DSQLITE_OMIT_AUTHORIZATION=1
 **
-** $Id: auth.c,v 1.16 2004/06/19 16:06:11 drh Exp $
+** $Id: auth.c,v 1.17 2004/09/06 17:24:12 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -70,7 +70,7 @@
 ** setting of the auth function is NULL.
 */
 int sqlite3_set_authorizer(
-  sqlite *db,
+  sqlite3 *db,
   int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
   void *pArg
 ){
@@ -104,7 +104,7 @@ void sqlite3AuthRead(
   Expr *pExpr,          /* The expression to check authorization on */
   SrcList *pTabList     /* All table that pExpr might refer to */
 ){
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   int rc;
   Table *pTab;          /* The table being read */
   const char *zCol;     /* Name of the column of the table */
@@ -170,7 +170,7 @@ int sqlite3AuthCheck(
   const char *zArg2,
   const char *zArg3
 ){
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   int rc;
 
   /* Don't do any authorization checks if the database is initialising. */
index 1ff47aef62eb16cff4ede64349a4bae8d5e194c0..3447898edadeb0b6f2405d786265b21913451f18 100644 (file)
@@ -23,7 +23,7 @@
 **     ROLLBACK
 **     PRAGMA
 **
-** $Id: build.c,v 1.250 2004/08/31 13:45:11 drh Exp $
+** $Id: build.c,v 1.251 2004/09/06 17:24:12 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -50,7 +50,7 @@ void sqlite3BeginParse(Parse *pParse, int explainFlag){
 ** no VDBE code was generated.
 */
 void sqlite3FinishCoding(Parse *pParse){
-  sqlite *db;
+  sqlite3 *db;
   Vdbe *v;
 
   if( sqlite3_malloc_failed ) return;
@@ -124,7 +124,7 @@ void sqlite3FinishCoding(Parse *pParse){
 **
 ** See also sqlite3LocateTable().
 */
-Table *sqlite3FindTable(sqlite *db, const char *zName, const char *zDatabase){
+Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
   Table *p = 0;
   int i;
   assert( zName!=0 );
@@ -184,7 +184,7 @@ Table *sqlite3LocateTable(Parse *pParse, const char *zName, const char *zDbase){
 ** TEMP first, then MAIN, then any auxiliary databases added
 ** using the ATTACH command.
 */
-Index *sqlite3FindIndex(sqlite *db, const char *zName, const char *zDb){
+Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
   Index *p = 0;
   int i;
   assert( (db->flags & SQLITE_Initialized) || db->init.busy );
@@ -213,7 +213,7 @@ static void freeIndex(Index *p){
 ** it is not unlinked from the Table that it indexes.
 ** Unlinking from the Table must be done by the calling function.
 */
-static void sqliteDeleteIndex(sqlite *db, Index *p){
+static void sqliteDeleteIndex(sqlite3 *db, Index *p){
   Index *pOld;
 
   assert( db!=0 && p->zName!=0 );
@@ -231,7 +231,7 @@ static void sqliteDeleteIndex(sqlite *db, Index *p){
 ** the index from the index hash table and free its memory
 ** structures.
 */
-void sqlite3UnlinkAndDeleteIndex(sqlite *db, int iDb, const char *zIdxName){
+void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
   Index *pIndex;
   int len;
 
@@ -263,7 +263,7 @@ void sqlite3UnlinkAndDeleteIndex(sqlite *db, int iDb, const char *zIdxName){
 ** files.  If iDb>=2 then reset the internal schema for only the
 ** single file indicated.
 */
-void sqlite3ResetInternalSchema(sqlite *db, int iDb){
+void sqlite3ResetInternalSchema(sqlite3 *db, int iDb){
   HashElem *pElem;
   Hash temp1;
   Hash temp2;
@@ -334,7 +334,7 @@ void sqlite3ResetInternalSchema(sqlite *db, int iDb){
 ** schema changes during the transaction, then we have to reset the
 ** internal hash tables and reload them from disk.
 */
-void sqlite3RollbackInternalChanges(sqlite *db){
+void sqlite3RollbackInternalChanges(sqlite3 *db){
   if( db->flags & SQLITE_InternChanges ){
     sqlite3ResetInternalSchema(db, 0);
   }
@@ -343,7 +343,7 @@ void sqlite3RollbackInternalChanges(sqlite *db){
 /*
 ** This routine is called when a commit occurs.
 */
-void sqlite3CommitInternalChanges(sqlite *db){
+void sqlite3CommitInternalChanges(sqlite3 *db){
   db->flags &= ~SQLITE_InternChanges;
 }
 
@@ -379,7 +379,7 @@ static void sqliteResetColumnNames(Table *pTable){
 ** the table are deleted, but it is assumed they have already been
 ** unlinked.
 */
-void sqlite3DeleteTable(sqlite *db, Table *pTable){
+void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
   Index *pIndex, *pNext;
   FKey *pFKey, *pNextFKey;
 
@@ -417,7 +417,7 @@ void sqlite3DeleteTable(sqlite *db, Table *pTable){
 ** Unlink the given table from the hash tables and the delete the
 ** table structure with all its indices and foreign keys.
 */
-void sqlite3UnlinkAndDeleteTable(sqlite *db, int iDb, const char *zTabName){
+void sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName){
   Table *p;
   FKey *pF1, *pF2;
   Db *pDb;
@@ -579,7 +579,7 @@ void sqlite3StartTable(
   Table *pTable;
   Index *pIdx;
   char *zName;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   Vdbe *v;
   int iDb;         /* Database number to create the table in */
   Token *pName;    /* Unqualified name of the table to create */
@@ -922,7 +922,7 @@ void sqlite3AddCollateType(Parse *pParse, const char *zType, int nType){
 ** each collation sequence structure.
 */
 static CollSeq * findCollSeqEntry(
-  sqlite *db,
+  sqlite3 *db,
   const char *zName,
   int nName,
   int create
@@ -957,7 +957,7 @@ static CollSeq * findCollSeqEntry(
 ** new entry.  Otherwise return NULL.
 */
 CollSeq *sqlite3FindCollSeq(
-  sqlite *db,
+  sqlite3 *db,
   u8 enc,
   const char *zName,
   int nName,
@@ -975,7 +975,7 @@ CollSeq *sqlite3FindCollSeq(
 ** in the database text encoding of name zName, length nName.
 ** If the collation sequence
 */
-static void callCollNeeded(sqlite *db, const char *zName, int nName){
+static void callCollNeeded(sqlite3 *db, const char *zName, int nName){
   assert( !db->xCollNeeded || !db->xCollNeeded16 );
   if( nName<0 ) nName = strlen(zName);
   if( db->xCollNeeded ){
@@ -1005,7 +1005,7 @@ static int synthCollSeq(Parse *pParse, CollSeq *pColl){
   CollSeq *pColl2;
   char *z = pColl->zName;
   int n = strlen(z);
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   int i;
   static const u8 aEnc[] = { SQLITE_UTF16BE, SQLITE_UTF16LE, SQLITE_UTF8 };
   for(i=0; i<3; i++){
@@ -1165,7 +1165,7 @@ char sqlite3AffinityType(const char *zType, int nType){
 ** and the probability of hitting the same cookie value is only
 ** 1 chance in 2^32.  So we're safe enough.
 */
-void sqlite3ChangeCookie(sqlite *db, Vdbe *v, int iDb){
+void sqlite3ChangeCookie(sqlite3 *db, Vdbe *v, int iDb){
   sqlite3VdbeAddOp(v, OP_Integer, db->aDb[iDb].schema_cookie+1, 0);
   sqlite3VdbeAddOp(v, OP_SetCookie, iDb, 0);
 }
@@ -1281,7 +1281,7 @@ static char *createTableStmt(Table *p){
 */
 void sqlite3EndTable(Parse *pParse, Token *pEnd, Select *pSelect){
   Table *p;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
 
   if( (pEnd==0 && pSelect==0) || pParse->nErr || sqlite3_malloc_failed ) return;
   p = pParse->pNewTable;
@@ -1542,7 +1542,7 @@ int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
 /*
 ** Clear the column names from every VIEW in database idx.
 */
-static void sqliteViewResetAll(sqlite *db, int idx){
+static void sqliteViewResetAll(sqlite3 *db, int idx){
   HashElem *i;
   if( !DbHasProperty(db, idx, DB_UnresetViews) ) return;
   for(i=sqliteHashFirst(&db->aDb[idx].tblHash); i; i=sqliteHashNext(i)){
@@ -1562,7 +1562,7 @@ void sqlite3DropTable(Parse *pParse, SrcList *pName, int isView){
   Table *pTab;
   Vdbe *v;
   int base;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   int iDb;
 
   if( pParse->nErr || sqlite3_malloc_failed ) goto exit_drop_table;
@@ -1835,7 +1835,7 @@ void sqlite3CreateIndex(
   Token nullId;    /* Fake token for an empty ID list */
   DbFixer sFix;    /* For assigning database names to pTable */
   int isTemp;      /* True for a temporary index */
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
 
   int iDb;          /* Index of the database that is being written */
   Token *pName = 0; /* Unqualified name of the index to create */
@@ -2182,7 +2182,7 @@ exit_create_index:
 void sqlite3DropIndex(Parse *pParse, SrcList *pName){
   Index *pIndex;
   Vdbe *v;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
 
   if( pParse->nErr || sqlite3_malloc_failed ) return;
   assert( pName->nSrc==1 );
@@ -2405,7 +2405,7 @@ void sqlite3SrcListDelete(SrcList *pList){
 ** Begin a transaction
 */
 void sqlite3BeginTransaction(Parse *pParse){
-  sqlite *db;
+  sqlite3 *db;
   Vdbe *v;
 
   if( pParse==0 || (db=pParse->db)==0 || db->aDb[0].pBt==0 ) return;
@@ -2421,7 +2421,7 @@ void sqlite3BeginTransaction(Parse *pParse){
 ** Commit a transaction
 */
 void sqlite3CommitTransaction(Parse *pParse){
-  sqlite *db;
+  sqlite3 *db;
   Vdbe *v;
 
   if( pParse==0 || (db=pParse->db)==0 || db->aDb[0].pBt==0 ) return;
@@ -2438,7 +2438,7 @@ void sqlite3CommitTransaction(Parse *pParse){
 ** Rollback a transaction
 */
 void sqlite3RollbackTransaction(Parse *pParse){
-  sqlite *db;
+  sqlite3 *db;
   Vdbe *v;
 
   if( pParse==0 || (db=pParse->db)==0 || db->aDb[0].pBt==0 ) return;
@@ -2501,7 +2501,7 @@ static int sqlite3OpenTempDatabase(Parse *pParse){
 ** early in the code, before we know if any database tables will be used.
 */
 void sqlite3CodeVerifySchema(Parse *pParse, int iDb){
-  sqlite *db;
+  sqlite3 *db;
   Vdbe *v;
   int mask;
 
@@ -2576,7 +2576,7 @@ void sqlite3EndWriteOperation(Parse *pParse){
 ** Return the transient sqlite3_value object used for encoding conversions
 ** during SQL compilation.
 */
-sqlite3_value *sqlite3GetTransientValue(sqlite *db){
+sqlite3_value *sqlite3GetTransientValue(sqlite3 *db){
   if( !db->pValue ){
     db->pValue = sqlite3ValueNew();
   }
index 449e29549ae1ddc48f131e58c8fc3eab276cd98c..2fa8af762ae89f1e79f7b1f126994eb5a55449f5 100644 (file)
@@ -16,7 +16,7 @@
 ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: date.c,v 1.34 2004/08/17 10:42:55 drh Exp $
+** $Id: date.c,v 1.35 2004/09/06 17:24:12 drh Exp $
 **
 ** NOTES:
 **
@@ -870,7 +870,7 @@ static void strftimeFunc(
 ** functions.  This should be the only routine in this file with
 ** external linkage.
 */
-void sqlite3RegisterDateTimeFunctions(sqlite *db){
+void sqlite3RegisterDateTimeFunctions(sqlite3 *db){
 #ifndef SQLITE_OMIT_DATETIME_FUNCS
   static struct {
      char *zName;
index 918b597dd1bca0158825ae8a9dbcd44156f8f01d..f741b5a3a80d3e9409d5ad8e9fc6074f6de43294 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle DELETE FROM statements.
 **
-** $Id: delete.c,v 1.79 2004/08/31 13:45:12 drh Exp $
+** $Id: delete.c,v 1.80 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -65,7 +65,7 @@ void sqlite3DeleteFrom(
   WhereInfo *pWInfo;     /* Information about the WHERE clause */
   Index *pIdx;           /* For looping over indices of the table */
   int iCur;              /* VDBE Cursor number for pTab */
-  sqlite *db;            /* Main database structure */
+  sqlite3 *db;           /* Main database structure */
   int isView;            /* True if attempting to delete from a view */
   AuthContext sContext;  /* Authorization context */
 
@@ -335,7 +335,7 @@ delete_from_cleanup:
 ** entries that point to that record.
 */
 void sqlite3GenerateRowDelete(
-  sqlite *db,        /* The database containing the index */
+  sqlite3 *db,       /* The database containing the index */
   Vdbe *v,           /* Generate code into this VDBE */
   Table *pTab,       /* Table containing the row to be deleted */
   int iCur,          /* Cursor number for the table */
@@ -365,7 +365,7 @@ void sqlite3GenerateRowDelete(
 **       deleted.
 */
 void sqlite3GenerateRowIndexDelete(
-  sqlite *db,        /* The database containing the index */
+  sqlite3 *db,       /* The database containing the index */
   Vdbe *v,           /* Generate code into this VDBE */
   Table *pTab,       /* Table containing the row to be deleted */
   int iCur,          /* Cursor number for the table */
index 91756363d29da40567b99648fe5fea80a85b2a06..b72474a6180333cb67a95cc56f85d41310c82c55 100644 (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.159 2004/09/01 03:06:35 drh Exp $
+** $Id: expr.c,v 1.160 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -601,7 +601,7 @@ static int lookupName(
   int i, j;            /* Loop counters */
   int cnt = 0;         /* Number of matching column names */
   int cntTab = 0;      /* Number of matching table names */
-  sqlite *db = pParse->db;  /* The database */
+  sqlite3 *db = pParse->db;  /* The database */
 
   assert( pColumnToken && pColumnToken->z ); /* The Z in X.Y.Z cannot be NULL */
   zDb = sqlite3NameFromToken(pDbToken);
@@ -1767,7 +1767,7 @@ int sqlite3ExprAnalyzeAggregates(Parse *pParse, Expr *pExpr){
 ** match that requested.
 */
 FuncDef *sqlite3FindFunction(
-  sqlite *db,        /* An open database */
+  sqlite3 *db,       /* An open database */
   const char *zName, /* Name of the function.  Not null-terminated */
   int nName,         /* Number of characters in the name */
   int nArg,          /* Number of arguments.  -1 means any number */
index b31f330ddaa94d7b7562bf84f776c845bd58e4c8..22921ba32fe5590524fe95bf6e73b91423628b75 100644 (file)
@@ -16,7 +16,7 @@
 ** sqliteRegisterBuildinFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: func.c,v 1.82 2004/09/02 15:53:57 drh Exp $
+** $Id: func.c,v 1.83 2004/09/06 17:24:13 drh Exp $
 */
 #include <ctype.h>
 #include <math.h>
@@ -268,7 +268,7 @@ static void last_insert_rowid(
   int arg, 
   sqlite3_value **argv
 ){
-  sqlite *db = sqlite3_user_data(context);
+  sqlite3 *db = sqlite3_user_data(context);
   sqlite3_result_int64(context, sqlite3_last_insert_rowid(db));
 }
 
@@ -281,7 +281,7 @@ static void changes(
   int arg,
   sqlite3_value **argv
 ){
-  sqlite *db = sqlite3_user_data(context);
+  sqlite3 *db = sqlite3_user_data(context);
   sqlite3_result_int(context, sqlite3_changes(db));
 }
 
@@ -294,7 +294,7 @@ static void total_changes(
   int arg,
   sqlite3_value **argv
 ){
-  sqlite *db = sqlite3_user_data(context);
+  sqlite3 *db = sqlite3_user_data(context);
   sqlite3_result_int(context, sqlite3_total_changes(db));
 }
 
@@ -690,7 +690,7 @@ static void test_destructor(
 ){
   char *zVal;
   int len;
-  sqlite *db = sqlite3_user_data(pCtx);
+  sqlite3 *db = sqlite3_user_data(pCtx);
  
   test_destructor_count_var++;
   assert( nArg==1 );
@@ -917,7 +917,7 @@ static void minMaxFinalize(sqlite3_context *context){
 ** functions.  This should be the only routine in this file with
 ** external linkage.
 */
-void sqlite3RegisterBuiltinFunctions(sqlite *db){
+void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
   static struct {
      char *zName;
      signed char nArg;
index 77638b7f2e6ecb64669e1052a6a255cc9b593e39..5b67d5c16b0200bbabb727bed58b68a6004546f2 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle INSERT statements in SQLite.
 **
-** $Id: insert.c,v 1.115 2004/08/21 17:54:45 drh Exp $
+** $Id: insert.c,v 1.116 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -179,7 +179,7 @@ void sqlite3Insert(
   int nColumn;          /* Number of columns in the data */
   int base = 0;         /* VDBE Cursor number for pTab */
   int iCont=0,iBreak=0; /* Beginning and end of the loop over srcTab */
-  sqlite *db;           /* The main database structure */
+  sqlite3 *db;          /* The main database structure */
   int keyColumn = -1;   /* Column that is the INTEGER PRIMARY KEY */
   int endOfLoop;        /* Label for the end of the insertion loop */
   int useTempTable;     /* Store SELECT results in intermediate table */
index c5ffe70a62a2013924d80dfc7805bd04037f4f38..3a93cb420cf7060cd80d9cd3a8c983d5ab54ec6c 100644 (file)
@@ -14,7 +14,7 @@
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: legacy.c,v 1.5 2004/08/08 23:39:19 drh Exp $
+** $Id: legacy.c,v 1.6 2004/09/06 17:24:13 drh Exp $
 */
 
 #include "sqliteInt.h"
@@ -32,7 +32,7 @@
 ** is invoked, even for queries.
 */
 int sqlite3_exec(
-  sqlite *db,                 /* The database on which the SQL executes */
+  sqlite3 *db,                /* The database on which the SQL executes */
   const char *zSql,           /* The SQL to be executed */
   sqlite_callback xCallback,  /* Invoke this callback routine */
   void *pArg,                 /* First argument to xCallback() */
index 92479ad3df7214ce19f7c923c10417ca9588e691..6d03eefe4f44d1fe727c4045b0b44be23fb96b79 100644 (file)
@@ -14,7 +14,7 @@
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: main.c,v 1.258 2004/09/02 15:53:57 drh Exp $
+** $Id: main.c,v 1.259 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -53,7 +53,7 @@ static void corruptSchema(InitData *pData, const char *zExtra){
 */
 int sqlite3InitCallback(void *pInit, int argc, char **argv, char **azColName){
   InitData *pData = (InitData*)pInit;
-  sqlite *db = pData->db;
+  sqlite3 *db = pData->db;
   int iDb;
 
   assert( argc==4 );
@@ -113,7 +113,7 @@ int sqlite3InitCallback(void *pInit, int argc, char **argv, char **azColName){
 ** auxiliary databases.  Return one of the SQLITE_ error codes to
 ** indicate success or failure.
 */
-static int sqlite3InitOne(sqlite *db, int iDb, char **pzErrMsg){
+static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
   int rc;
   BtCursor *curMain;
   int size;
@@ -309,7 +309,7 @@ static int sqlite3InitOne(sqlite *db, int iDb, char **pzErrMsg){
 ** After the database is initialized, the SQLITE_Initialized
 ** bit is set in the flags field of the sqlite structure. 
 */
-int sqlite3Init(sqlite *db, char **pzErrMsg){
+int sqlite3Init(sqlite3 *db, char **pzErrMsg){
   int i, rc;
   
   if( db->init.busy ) return SQLITE_OK;
@@ -417,14 +417,14 @@ static int nocaseCollatingFunc(
 /*
 ** Return the ROWID of the most recent insert
 */
-sqlite_int64 sqlite3_last_insert_rowid(sqlite *db){
+sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
   return db->lastRowid;
 }
 
 /*
 ** Return the number of changes in the most recent call to sqlite3_exec().
 */
-int sqlite3_changes(sqlite *db){
+int sqlite3_changes(sqlite3 *db){
   return db->nChange;
 }
 
@@ -438,7 +438,7 @@ int sqlite3_total_changes(sqlite3 *db){
 /*
 ** Close an existing SQLite database
 */
-int sqlite3_close(sqlite *db){
+int sqlite3_close(sqlite3 *db){
   HashElem *i;
   int j;
 
@@ -512,7 +512,7 @@ int sqlite3_close(sqlite *db){
 /*
 ** Rollback all database files.
 */
-void sqlite3RollbackAll(sqlite *db){
+void sqlite3RollbackAll(sqlite3 *db){
   int i;
   for(i=0; i<db->nDb; i++){
     if( db->aDb[i].pBt ){
@@ -625,7 +625,7 @@ int sqlite3_busy_handler(
 ** be invoked every nOps opcodes.
 */
 void sqlite3_progress_handler(
-  sqlite *db, 
+  sqlite3 *db, 
   int nOps,
   int (*xProgress)(void*), 
   void *pArg
@@ -659,7 +659,7 @@ int sqlite3_busy_timeout(sqlite3 *db, int ms){
 /*
 ** Cause any pending operation to stop at its earliest opportunity.
 */
-void sqlite3_interrupt(sqlite *db){
+void sqlite3_interrupt(sqlite3 *db){
   db->flags |= SQLITE_Interrupt;
 }
 
@@ -761,7 +761,7 @@ int sqlite3_create_function16(
 ** trace is a pointer to a function that is invoked at the start of each
 ** sqlite3_exec().
 */
-void *sqlite3_trace(sqlite *db, void (*xTrace)(void*,const char*), void *pArg){
+void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
   void *pOld = db->pTraceArg;
   db->xTrace = xTrace;
   db->pTraceArg = pArg;
@@ -775,7 +775,7 @@ void *sqlite3_trace(sqlite *db, void (*xTrace)(void*,const char*), void *pArg){
 ** rollback.
 */
 void *sqlite3_commit_hook(
-  sqlite *db,               /* Attach the hook to this database */
+  sqlite3 *db,              /* Attach the hook to this database */
   int (*xCallback)(void*),  /* Function to invoke on each commit */
   void *pArg                /* Argument to the function */
 ){
@@ -812,7 +812,7 @@ void *sqlite3_commit_hook(
 **           3               any             memory
 */
 int sqlite3BtreeFactory(
-  const sqlite *db,        /* Main database when opening aux otherwise 0 */
+  const sqlite3 *db,        /* Main database when opening aux otherwise 0 */
   const char *zFilename,    /* Name of the file containing the BTree database */
   int omitJournal,          /* if TRUE then do not journal this file */
   int nCache,               /* How many pages in the page cache */
@@ -930,7 +930,7 @@ int sqlite3_errcode(sqlite3 *db){
 ** Check schema cookies in all databases.  If any cookie is out
 ** of date, return 0.  If all schema cookies are current, return 1.
 */
-static int schemaIsValid(sqlite *db){
+static int schemaIsValid(sqlite3 *db){
   int iDb;
   int rc;
   BtCursor *curTemp;
@@ -1118,7 +1118,7 @@ static int openDatabase(
   char *zErrMsg = 0;
 
   /* Allocate the sqlite data structure */
-  db = sqliteMalloc( sizeof(sqlite) );
+  db = sqliteMalloc( sizeof(sqlite3) );
   if( db==0 ) goto opendb_out;
   db->priorNewRowid = 0;
   db->magic = SQLITE_MAGIC_BUSY;
index d21f7699b22b177444ffbb639be01dfcb63ad14f..1aff7d552b7077c4ba5f30a064bfc971a0757d15 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code used to implement the PRAGMA command.
 **
-** $Id: pragma.c,v 1.63 2004/09/05 23:23:42 drh Exp $
+** $Id: pragma.c,v 1.64 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -95,7 +95,7 @@ static int getTempStore(const char *z){
 */
 static int changeTempStorage(Parse *pParse, const char *zStorageType){
   int ts = getTempStore(zStorageType);
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   if( db->temp_store==ts ) return SQLITE_OK;
   if( db->aDb[1].pBt!=0 ){
     if( db->flags & SQLITE_InTrans ){
@@ -147,7 +147,7 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
   int i;
   for(i=0; i<sizeof(aPragma)/sizeof(aPragma[0]); i++){
     if( sqlite3StrICmp(zLeft, aPragma[i].zName)==0 ){
-      sqlite *db = pParse->db;
+      sqlite3 *db = pParse->db;
       Vdbe *v;
       if( zRight==0 ){
         v = sqlite3GetVdbe(pParse);
@@ -193,7 +193,7 @@ void sqlite3Pragma(
   const char *zDb = 0;   /* The database name */
   Token *pId;            /* Pointer to <id> token */
   int iDb;               /* Database index for <database> */
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   Db *pDb;
   Vdbe *v = sqlite3GetVdbe(pParse);
   if( v==0 ) return;
index 876b856418153d0c4a60716a1d59c7f9eeefb0ca..65a24871c23b252311f3cd85f0d219df5af78ffa 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle SELECT statements in SQLite.
 **
-** $Id: select.c,v 1.206 2004/09/01 03:06:35 drh Exp $
+** $Id: select.c,v 1.207 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -565,7 +565,7 @@ static void generateSortTail(
   KeyInfo *pInfo;
   ExprList *pOrderBy;
   int nCol, i;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
 
   if( eDest==SRT_Sorter ) return;
   pOrderBy = p->pOrderBy;
@@ -720,7 +720,7 @@ static void generateColumnNames(
 ){
   Vdbe *v = pParse->pVdbe;
   int i, j;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   int fullNames, shortNames;
 
   /* If this is an EXPLAIN, skip this step */
@@ -1253,7 +1253,7 @@ static void computeLimitRegisters(Parse *pParse, Select *p){
 static int openTempIndex(Parse *pParse, Select *p, int iTab, int keyAsData){
   KeyInfo *pKeyInfo;
   int nColumn;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   int i;
   Vdbe *v = pParse->pVdbe;
   int addr;
index abc76cb5c9c18abfd342b2bd47f08323ae2a7741..cc506408b96c933ca7913073450787f9ddcb48e9 100644 (file)
@@ -12,7 +12,7 @@
 ** This header file defines the interface that the SQLite library
 ** presents to client programs.
 **
-** @(#) $Id: sqlite.h.in,v 1.116 2004/08/29 23:42:14 drh Exp $
+** @(#) $Id: sqlite.h.in,v 1.117 2004/09/06 17:24:13 drh Exp $
 */
 #ifndef _SQLITE_H_
 #define _SQLITE_H_
@@ -44,7 +44,7 @@ const char *sqlite3_libversion();
 ** Each open sqlite database is represented by an instance of the
 ** following opaque structure.
 */
-typedef struct sqlite sqlite3;
+typedef struct sqlite3 sqlite3;
 
 
 /*
index 2e40eb67906fa6789f68afe8f38f0413d85a4814..28f9f36c18023155dba2ba67bf72219216f35481 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.318 2004/09/01 03:06:35 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.319 2004/09/06 17:24:13 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -143,8 +143,6 @@ extern const int sqlite3one;
 #define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)
 #define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
 
-typedef struct sqlite sqlite;
-
 /*
 ** An instance of the following structure is used to store the busy-handler
 ** callback for a given sqlite handle. 
@@ -347,7 +345,7 @@ struct Db {
 ** internal function sqlite3Error() is used to set these variables
 ** consistently.
 */
-struct sqlite {
+struct sqlite3 {
   int nDb;                      /* Number of backends currently in use */
   Db *aDb;                      /* All backends */
   Db aDbStatic[2];              /* Static space for the 2 default backends */
@@ -970,7 +968,7 @@ struct AggExpr {
 ** carry around information that is global to the entire parse.
 */
 struct Parse {
-  sqlite *db;          /* The main database structure */
+  sqlite3 *db;         /* The main database structure */
   int rc;              /* Return code from execution */
   char *zErrMsg;       /* An error message */
   Token sErrToken;     /* The token at which the error occurred */
@@ -1022,7 +1020,7 @@ struct AuthContext {
  * struct Trigger. 
  *
  * Pointers to instances of struct Trigger are stored in two ways.
- * 1. In the "trigHash" hash table (part of the sqlite* that represents the 
+ * 1. In the "trigHash" hash table (part of the sqlite3* that represents the 
  *    database). This allows Trigger structures to be retrieved by name.
  * 2. All triggers associated with a single table form a linked list, using the
  *    pNext member of struct Trigger. A pointer to the first element of the
@@ -1158,7 +1156,7 @@ struct DbFixer {
 ** from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback.
 */
 typedef struct {
-  sqlite *db;         /* The database being initialized */
+  sqlite3 *db;        /* The database being initialized */
   char **pzErrMsg;    /* Error message stored here */
 } InitData;
 
@@ -1214,13 +1212,13 @@ Expr *sqlite3ExprFunction(ExprList*, Token*);
 void sqlite3ExprDelete(Expr*);
 ExprList *sqlite3ExprListAppend(ExprList*,Expr*,Token*);
 void sqlite3ExprListDelete(ExprList*);
-int sqlite3Init(sqlite*, char**);
+int sqlite3Init(sqlite3*, char**);
 int sqlite3InitCallback(void*, int, char**, char**);
 void sqlite3Pragma(Parse*,Token*,Token*,Token*,int);
-void sqlite3ResetInternalSchema(sqlite*, int);
+void sqlite3ResetInternalSchema(sqlite3*, int);
 void sqlite3BeginParse(Parse*,int);
-void sqlite3RollbackInternalChanges(sqlite*);
-void sqlite3CommitInternalChanges(sqlite*);
+void sqlite3RollbackInternalChanges(sqlite3*);
+void sqlite3CommitInternalChanges(sqlite3*);
 Table *sqlite3ResultSetOfSelect(Parse*,char*,Select*);
 void sqlite3OpenMasterTable(Vdbe *v, int);
 void sqlite3StartTable(Parse*,Token*,Token*,Token*,int,int);
@@ -1234,7 +1232,7 @@ void sqlite3EndTable(Parse*,Token*,Select*);
 void sqlite3CreateView(Parse*,Token*,Token*,Token*,Select*,int);
 int sqlite3ViewGetColumnNames(Parse*,Table*);
 void sqlite3DropTable(Parse*, SrcList*, int);
-void sqlite3DeleteTable(sqlite*, Table*);
+void sqlite3DeleteTable(sqlite3*, Table*);
 void sqlite3Insert(Parse*, SrcList*, ExprList*, Select*, IdList*, int);
 IdList *sqlite3IdListAppend(IdList*, Token*);
 int sqlite3IdListIndex(IdList*,const char*);
@@ -1263,14 +1261,14 @@ void sqlite3ExprCode(Parse*, Expr*);
 int sqlite3ExprCodeExprList(Parse*, ExprList*);
 void sqlite3ExprIfTrue(Parse*, Expr*, int, int);
 void sqlite3ExprIfFalse(Parse*, Expr*, int, int);
-Table *sqlite3FindTable(sqlite*,const char*, const char*);
+Table *sqlite3FindTable(sqlite3*,const char*, const char*);
 Table *sqlite3LocateTable(Parse*,const char*, const char*);
-Index *sqlite3FindIndex(sqlite*,const char*, const char*);
-void sqlite3UnlinkAndDeleteTable(sqlite*,int,const char*);
-void sqlite3UnlinkAndDeleteIndex(sqlite*,int,const char*);
-void sqlite3UnlinkAndDeleteTrigger(sqlite*,int,const char*);
+Index *sqlite3FindIndex(sqlite3*,const char*, const char*);
+void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);
+void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
+void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);
 void sqlite3Vacuum(Parse*, Token*);
-int sqlite3RunVacuum(char**, sqlite*);
+int sqlite3RunVacuum(char**, sqlite3*);
 char *sqlite3NameFromToken(Token*);
 int sqlite3ExprCheck(Parse*, Expr*, int, int*);
 int sqlite3ExprCompare(Expr*, Expr*);
@@ -1280,7 +1278,7 @@ int sqlite3ExprResolveAndCheck(Parse*,SrcList*,ExprList*,Expr*,int,int*);
 int sqlite3ExprAnalyzeAggregates(Parse*, Expr*);
 Vdbe *sqlite3GetVdbe(Parse*);
 void sqlite3Randomness(int, void*);
-void sqlite3RollbackAll(sqlite*);
+void sqlite3RollbackAll(sqlite3*);
 void sqlite3CodeVerifySchema(Parse*, int);
 void sqlite3BeginTransaction(Parse*);
 void sqlite3CommitTransaction(Parse*);
@@ -1288,8 +1286,8 @@ void sqlite3RollbackTransaction(Parse*);
 int sqlite3ExprIsConstant(Expr*);
 int sqlite3ExprIsInteger(Expr*, int*);
 int sqlite3IsRowid(const char*);
-void sqlite3GenerateRowDelete(sqlite*, Vdbe*, Table*, int, int);
-void sqlite3GenerateRowIndexDelete(sqlite*, Vdbe*, Table*, int, char*);
+void sqlite3GenerateRowDelete(sqlite3*, Vdbe*, Table*, int, int);
+void sqlite3GenerateRowIndexDelete(sqlite3*, Vdbe*, Table*, int, char*);
 void sqlite3GenerateIndexKey(Vdbe*, Index*, int);
 void sqlite3GenerateConstraintChecks(Parse*,Table*,int,char*,int,int,int,int);
 void sqlite3CompleteInsertion(Parse*, Table*, int, char*, int, int, int);
@@ -1302,13 +1300,13 @@ ExprList *sqlite3ExprListDup(ExprList*);
 SrcList *sqlite3SrcListDup(SrcList*);
 IdList *sqlite3IdListDup(IdList*);
 Select *sqlite3SelectDup(Select*);
-FuncDef *sqlite3FindFunction(sqlite*,const char*,int,int,u8,int);
-void sqlite3RegisterBuiltinFunctions(sqlite*);
-void sqlite3RegisterDateTimeFunctions(sqlite*);
-int sqlite3SafetyOn(sqlite*);
-int sqlite3SafetyOff(sqlite*);
-int sqlite3SafetyCheck(sqlite*);
-void sqlite3ChangeCookie(sqlite*, Vdbe*, int);
+FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,int);
+void sqlite3RegisterBuiltinFunctions(sqlite3*);
+void sqlite3RegisterDateTimeFunctions(sqlite3*);
+int sqlite3SafetyOn(sqlite3*);
+int sqlite3SafetyOff(sqlite3*);
+int sqlite3SafetyCheck(sqlite3*);
+void sqlite3ChangeCookie(sqlite3*, Vdbe*, int);
 void sqlite3BeginTrigger(Parse*, Token*,Token*,int,int,IdList*,SrcList*,
                          int,Expr*,int);
 void sqlite3FinishTrigger(Parse*, TriggerStep*, Token*);
@@ -1340,7 +1338,7 @@ void sqlite3DeferForeignKey(Parse*, int);
 #endif
 void sqlite3Attach(Parse*, Token*, Token*, int, Token*);
 void sqlite3Detach(Parse*, Token*);
-int sqlite3BtreeFactory(const sqlite *db, const char *zFilename,
+int sqlite3BtreeFactory(const sqlite3 *db, const char *zFilename,
                        int omitJournal, int nCache, Btree **ppBtree);
 int sqlite3FixInit(DbFixer*, Parse*, int, const char*, const Token*);
 int sqlite3FixSrcList(DbFixer*, SrcList*);
@@ -1367,13 +1365,13 @@ char const *sqlite3AffinityString(char affinity);
 int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity);
 char sqlite3ExprAffinity(Expr *pExpr);
 int sqlite3atoi64(const char*, i64*);
-void sqlite3Error(sqlite *, int, const char*,...);
+void sqlite3Error(sqlite3*, int, const char*,...);
 void *sqlite3HexToBlob(const char *z);
 int sqlite3TwoPartName(Parse *, Token *, Token *, Token **);
 const char *sqlite3ErrStr(int);
 int sqlite3ReadUniChar(const char *zStr, int *pOffset, u8 *pEnc, int fold);
 int sqlite3ReadSchema(Parse *pParse);
-CollSeq *sqlite3FindCollSeq(sqlite *,u8 enc, const char *,int,int);
+CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char *,int,int);
 CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char *zName, int nName);
 CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr);
 int sqlite3CheckCollSeq(Parse *, CollSeq *);
@@ -1387,7 +1385,7 @@ int sqlite3ValueBytes(sqlite3_value*, u8);
 void sqlite3ValueSetStr(sqlite3_value*, int, const void *,u8, void(*)(void*));
 void sqlite3ValueFree(sqlite3_value*);
 sqlite3_value *sqlite3ValueNew();
-sqlite3_value *sqlite3GetTransientValue(sqlite *db);
+sqlite3_value *sqlite3GetTransientValue(sqlite3*db);
 extern const unsigned char sqlite3UpperToLower[];
 
 #endif
index dd0438c6355cb549c31fd7324b68f99bd830e4cb..2725be927279cedbd15da885c0fb1321ddb8dada 100644 (file)
@@ -118,7 +118,7 @@ malloc_failed:
 ** the calling procedure is finished using it.
 */
 int sqlite3_get_table(
-  sqlite *db,                 /* The database on which the SQL executes */
+  sqlite3 *db,                /* The database on which the SQL executes */
   const char *zSql,           /* The SQL to be executed */
   char ***pazResult,          /* Write the result table here */
   int *pnRow,                 /* Write the number of rows in the result here */
index 8c91ccd105713e37c43af158c929d8c5fe309b4d..bcc2f0ef6f83de640494542515bbccfd3a629c5c 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** A TCL Interface to SQLite
 **
-** $Id: tclsqlite.c,v 1.103 2004/08/26 00:56:05 drh Exp $
+** $Id: tclsqlite.c,v 1.104 2004/09/06 17:24:13 drh Exp $
 */
 #ifndef NO_TCL     /* Omit this whole file if TCL is unavailable */
 
@@ -205,7 +205,7 @@ static int DbCommitHandler(void *cd){
 
 static void tclCollateNeeded(
   void *pCtx,
-  sqlite *db,
+  sqlite3 *db,
   int enc,
   const char *zName
 ){
@@ -367,7 +367,7 @@ static Tcl_Obj *dbTextToObj(char const *zText){
 ** whenever one of those connection-specific commands is executed
 ** in Tcl.  For example, if you run Tcl code like this:
 **
-**       sqlite db1  "my_database"
+**       sqlite3 db1  "my_database"
 **       db1 close
 **
 ** The first command opens a connection to the "my_database" database
@@ -1073,7 +1073,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
 }
 
 /*
-**   sqlite DBNAME FILENAME ?MODE? ?-key KEY?
+**   sqlite3 DBNAME FILENAME ?MODE? ?-key KEY?
 **
 ** This is the main Tcl command.  When the "sqlite" Tcl command is
 ** invoked, this routine runs to process that command.
@@ -1088,16 +1088,16 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
 **
 ** For testing purposes, we also support the following:
 **
-**  sqlite -encoding
+**  sqlite3 -encoding
 **
 **       Return the encoding used by LIKE and GLOB operators.  Choices
 **       are UTF-8 and iso8859.
 **
-**  sqlite -version
+**  sqlite3 -version
 **
 **       Return the version number of the SQLite library.
 **
-**  sqlite -tcl-uses-utf
+**  sqlite3 -tcl-uses-utf
 **
 **       Return "1" if compiled with a Tcl uses UTF-8.  Return "0" if
 **       not.  Used by tests to make sure the library was compiled 
@@ -1190,7 +1190,7 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
   */
 #ifdef SQLITE_TEST
   {
-    extern void Md5_Register(sqlite*);
+    extern void Md5_Register(sqlite3*);
 #ifdef SQLITE_DEBUG
     int mallocfail = sqlite3_iMallocFail;
     sqlite3_iMallocFail = 0;
index 4498317dc29e75e5aaa25d6436d9a337e87c7657..cbd3e7372d09220ae9999098de779f94e7509be1 100644 (file)
@@ -13,7 +13,7 @@
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test1.c,v 1.100 2004/08/29 23:42:14 drh Exp $
+** $Id: test1.c,v 1.101 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
@@ -65,9 +65,9 @@ static const char * errorName(int rc){
 }
 
 /*
-** Decode a pointer to an sqlite object.
+** Decode a pointer to an sqlite3 object.
 */
-static int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite **ppDb){
+static int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb){
   if( sscanf(zA, PTR_FMT, (void**)ppDb)!=1 && 
       (zA[0]!='0' || zA[1]!='x' || sscanf(&zA[2], PTR_FMT, (void**)ppDb)!=1)
   ){
@@ -168,7 +168,7 @@ static int test_exec_printf(
   int argc,              /* Number of arguments */
   char **argv            /* Text of each argument */
 ){
-  sqlite *db;
+  sqlite3 *db;
   Tcl_DString str;
   int rc;
   char *zErr = 0;
@@ -229,7 +229,7 @@ static int test_get_table_printf(
   int argc,              /* Number of arguments */
   char **argv            /* Text of each argument */
 ){
-  sqlite *db;
+  sqlite3 *db;
   Tcl_DString str;
   int rc;
   char *zErr = 0;
@@ -278,7 +278,7 @@ static int test_last_rowid(
   int argc,              /* Number of arguments */
   char **argv            /* Text of each argument */
 ){
-  sqlite *db;
+  sqlite3 *db;
   char zBuf[30];
 
   if( argc!=2 ){
@@ -302,7 +302,7 @@ static int test_key(
   int argc,              /* Number of arguments */
   char **argv            /* Text of each argument */
 ){
-  sqlite *db;
+  sqlite3 *db;
   const char *zKey;
   int nKey;
   if( argc!=3 ){
@@ -330,7 +330,7 @@ static int test_rekey(
   int argc,              /* Number of arguments */
   char **argv            /* Text of each argument */
 ){
-  sqlite *db;
+  sqlite3 *db;
   const char *zKey;
   int nKey;
   if( argc!=3 ){
@@ -358,7 +358,7 @@ static int sqlite_test_close(
   int argc,              /* Number of arguments */
   char **argv            /* Text of each argument */
 ){
-  sqlite *db;
+  sqlite3 *db;
   int rc;
   if( argc!=2 ){
     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
@@ -452,7 +452,7 @@ static void sqlite3ExecFunc(
 ){
   struct dstr x;
   memset(&x, 0, sizeof(x));
-  sqlite3_exec((sqlite*)sqlite3_user_data(context),
+  sqlite3_exec((sqlite3*)sqlite3_user_data(context),
       sqlite3_value_text(argv[0]),
       execFuncCallback, &x, 0);
   sqlite3_result_text(context, x.z, x.nUsed, SQLITE_TRANSIENT);
@@ -480,9 +480,9 @@ static int test_create_function(
   int argc,              /* Number of arguments */
   char **argv            /* Text of each argument */
 ){
-  sqlite *db;
+  sqlite3 *db;
   sqlite3_value *pVal;
-  extern void Md5_Register(sqlite*);
+  extern void Md5_Register(sqlite3*);
 
   if( argc!=2 ){
     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
@@ -540,7 +540,7 @@ static int test_create_aggregate(
   int argc,              /* Number of arguments */
   char **argv            /* Text of each argument */
 ){
-  sqlite *db;
+  sqlite3 *db;
   if( argc!=2 ){
     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
        " FILENAME\"", 0);
@@ -846,7 +846,7 @@ static int test_register_func(
   int argc,              /* Number of arguments */
   char **argv            /* Text of each argument */
 ){
-  sqlite *db;
+  sqlite3 *db;
   int rc;
   if( argc!=3 ){
     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], 
@@ -1681,7 +1681,7 @@ static int test_errmsg(
   int objc,
   Tcl_Obj *CONST objv[]
 ){
-  sqlite *db;
+  sqlite3 *db;
   const char *zErr;
 
   if( objc!=2 ){
@@ -1710,7 +1710,7 @@ static int test_errmsg16(
   int objc,
   Tcl_Obj *CONST objv[]
 ){
-  sqlite *db;
+  sqlite3 *db;
   const void *zErr;
   int bytes;
 
index a5ebe0b1d5ce6ec25929eb6543531cc3f6337984..403f9e1c995bf0afb3eb2a1297a0f5456db83639 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Code for testing the the SQLite library in a multithreaded environment.
 **
-** $Id: test4.c,v 1.11 2004/08/08 20:22:18 drh Exp $
+** $Id: test4.c,v 1.12 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
@@ -40,7 +40,7 @@ struct Thread {
   /* The next group of fields are writable by the thread but read-only to the
   ** master. */
   int completed;        /* Number of operations completed */
-  sqlite *db;           /* Open database */
+  sqlite3 *db;           /* Open database */
   sqlite3_stmt *pStmt;     /* Pending operation */
   char *zErr;           /* operation error */
   char *zStaticErr;     /* Static error message */
@@ -591,7 +591,7 @@ static int tcl_thread_swap(
   const char **argv      /* Text of each argument */
 ){
   int i, j;
-  sqlite *temp;
+  sqlite3 *temp;
   if( argc!=3 ){
     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
        " ID1 ID2", 0);
index 891a6352edfce1930817f3d59fe98f718aaec246..f3bda60144fcab916c8f95a2a09b8f4d1bd8f507 100644 (file)
@@ -15,7 +15,7 @@
 ** individual tokens and sends those tokens one-by-one over to the
 ** parser for analysis.
 **
-** $Id: tokenize.c,v 1.84 2004/08/25 04:07:02 drh Exp $
+** $Id: tokenize.c,v 1.85 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -461,7 +461,7 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
   void *pEngine;
   int tokenType;
   int lastTokenParsed = -1;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   extern void *sqlite3ParserAlloc(void*(*)(int));
   extern void sqlite3ParserFree(void*, void(*)(void*));
   extern int sqlite3Parser(void*, int, Token, Parse*);
index 3c07996d6644668fff50d80c6a5f38cdcb59b812..c387d03133e353196f203f960b4688eee8e312c5 100644 (file)
@@ -53,7 +53,7 @@ void sqlite3BeginTrigger(
   Trigger *pTrigger;
   Table *pTab;
   char *zName = 0;        /* Name of the trigger */
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   int iDb;                /* The database to store the trigger in */
   Token *pName;           /* The unqualified db name */
   DbFixer sFix;
@@ -191,7 +191,7 @@ void sqlite3FinishTrigger(
   Token *pAll             /* Token that describes the complete CREATE TRIGGER */
 ){
   Trigger *nt = 0;          /* The trigger whose construction is finishing up */
-  sqlite *db = pParse->db;  /* The database */
+  sqlite3 *db = pParse->db;  /* The database */
   DbFixer sFix;
 
   if( pParse->nErr || pParse->pNewTrigger==0 ) goto triggerfinish_cleanup;
@@ -419,7 +419,7 @@ void sqlite3DropTrigger(Parse *pParse, SrcList *pName){
   const char *zDb;
   const char *zName;
   int nName;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
 
   if( sqlite3_malloc_failed ) goto drop_trigger_cleanup;
   if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
@@ -463,7 +463,7 @@ static Table *tableOfTrigger(sqlite3 *db, Trigger *pTrigger){
 void sqlite3DropTriggerPtr(Parse *pParse, Trigger *pTrigger, int nested){
   Table   *pTable;
   Vdbe *v;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
   int iDb;
 
   iDb = pTrigger->iDb;
index 97e9aff2853ad4396f2f629552e012abc46dbb88..60c049d68a0697d827d552cf96d7f3cf4d68883a 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle UPDATE statements.
 **
-** $Id: update.c,v 1.87 2004/08/31 13:45:12 drh Exp $
+** $Id: update.c,v 1.88 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -39,7 +39,7 @@ void sqlite3Update(
   int nIdx;              /* Number of indices that need updating */
   int nIdxTotal;         /* Total number of indices */
   int iCur;              /* VDBE Cursor number of pTab */
-  sqlite *db;            /* The database structure */
+  sqlite3 *db;           /* The database structure */
   Index **apIdx = 0;     /* An array of indices that need updating too */
   char *aIdxUsed = 0;    /* aIdxUsed[i]==1 if the i-th index is used */
   int *aXRef = 0;        /* aXRef[i] is the index in pChanges->a[] of the
index 0ce4e7db191c3d5eb2af98b2fe3feece3da4b9d7..4c148087c607e62348db68d1568ac026d9a53d6f 100644 (file)
@@ -14,7 +14,7 @@
 ** This file contains functions for allocating memory, comparing
 ** strings, and stuff like that.
 **
-** $Id: util.c,v 1.115 2004/09/05 23:23:42 drh Exp $
+** $Id: util.c,v 1.116 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 #include <stdarg.h>
@@ -452,7 +452,7 @@ void sqlite3SetNString(char **pz, ...){
 ** should be called with err_code set to SQLITE_OK and zFormat set
 ** to NULL.
 */
-void sqlite3Error(sqlite *db, int err_code, const char *zFormat, ...){
+void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
   if( db && (db->pErr || (db->pErr = sqlite3ValueNew())) ){
     db->errCode = err_code;
     if( zFormat ){
@@ -782,7 +782,7 @@ int sqlite3FitsIn64Bits(const char *zNum){
 ** call to sqlite3_close(db) and db has been deallocated.  And we do
 ** not want to write into deallocated memory.
 */
-int sqlite3SafetyOn(sqlite *db){
+int sqlite3SafetyOn(sqlite3 *db){
   if( db->magic==SQLITE_MAGIC_OPEN ){
     db->magic = SQLITE_MAGIC_BUSY;
     return 0;
@@ -798,7 +798,7 @@ int sqlite3SafetyOn(sqlite *db){
 ** Return an error (non-zero) if the magic was not SQLITE_MAGIC_BUSY
 ** when this routine is called.
 */
-int sqlite3SafetyOff(sqlite *db){
+int sqlite3SafetyOff(sqlite3 *db){
   if( db->magic==SQLITE_MAGIC_BUSY ){
     db->magic = SQLITE_MAGIC_OPEN;
     return 0;
@@ -818,7 +818,7 @@ int sqlite3SafetyOff(sqlite *db){
 ** This routine is used to try to detect when API routines are called
 ** at the wrong time or in the wrong sequence.
 */
-int sqlite3SafetyCheck(sqlite *db){
+int sqlite3SafetyCheck(sqlite3 *db){
   if( db->pVdbe!=0 ){
     db->magic = SQLITE_MAGIC_ERROR;
     return 1;
index 9141cfe8ed9d2fc91bc3ba0f35162084e3b599c6..016da056ddc92bbaf94a56c9ec05e9975e3bf744 100644 (file)
@@ -14,7 +14,7 @@
 ** Most of the code in this file may be omitted by defining the
 ** SQLITE_OMIT_VACUUM macro.
 **
-** $Id: vacuum.c,v 1.30 2004/09/05 00:33:43 drh Exp $
+** $Id: vacuum.c,v 1.31 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -91,7 +91,7 @@ void sqlite3Vacuum(Parse *pParse, Token *pTableName){
 /*
 ** This routine implements the OP_Vacuum opcode of the VDBE.
 */
-int sqlite3RunVacuum(char **pzErrMsg, sqlite *db){
+int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
   int rc = SQLITE_OK;     /* Return code from service routines */
 #if !defined(SQLITE_OMIT_VACUUM) || SQLITE_OMIT_VACUUM
   const char *zFilename;  /* full pathname of the database file */
index a3d3dd65116714860ec59387165671a33f65d9a8..d4920a8a27e716a9dbe63980f31ac08073352bc8 100644 (file)
@@ -43,7 +43,7 @@
 ** in this file for details.  If in doubt, do not deviate from existing
 ** commenting and indentation practices when changing or adding code.
 **
-** $Id: vdbe.c,v 1.413 2004/09/02 14:57:09 drh Exp $
+** $Id: vdbe.c,v 1.414 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -461,7 +461,7 @@ int sqlite3VdbeExec(
   int pc;                    /* The program counter */
   Op *pOp;                   /* Current operation */
   int rc = SQLITE_OK;        /* Value to return */
-  sqlite *db = p->db;        /* The database */
+  sqlite3 *db = p->db;       /* The database */
   Mem *pTos;                 /* Top entry in the operand stack */
   char zBuf[100];            /* Space to sprintf() an integer */
 #ifdef VDBE_PROFILE
index 6e7d11c3ddb21c44185b42073520b4474f9c06db..edef241de07cedec64d2dd51a81c71a3e88cbfb9 100644 (file)
@@ -15,7 +15,7 @@
 ** or VDBE.  The VDBE implements an abstract machine that runs a
 ** simple program to access and modify the underlying database.
 **
-** $Id: vdbe.h,v 1.90 2004/08/21 17:54:45 drh Exp $
+** $Id: vdbe.h,v 1.91 2004/09/06 17:24:13 drh Exp $
 */
 #ifndef _SQLITE_VDBE_H_
 #define _SQLITE_VDBE_H_
@@ -97,7 +97,7 @@ typedef struct VdbeOpList VdbeOpList;
 ** Prototypes for the VDBE interface.  See comments on the implementation
 ** for a description of what each of these routines does.
 */
-Vdbe *sqlite3VdbeCreate(sqlite*);
+Vdbe *sqlite3VdbeCreate(sqlite3*);
 void sqlite3VdbeCreateCallback(Vdbe*, int*);
 int sqlite3VdbeAddOp(Vdbe*,int,int,int);
 int sqlite3VdbeOp3(Vdbe*,int,int,int,const char *zP3,int);
index ef92acc9cfe36c732be0fc317a0e9af3aa604f5f..ba6b5916003322c08e1b5a9d579b1394a6999871 100644 (file)
@@ -295,7 +295,7 @@ struct Context {
 ** is really a pointer to an instance of this structure.
 */
 struct Vdbe {
-  sqlite *db;         /* The whole database */
+  sqlite3 *db;        /* The whole database */
   Vdbe *pPrev,*pNext; /* Linked list of VDBEs with the same Vdbe.db */
   FILE *trace;        /* Write an execution trace here, if not NULL */
   int nOp;            /* Number of instructions in the program */
@@ -356,7 +356,7 @@ struct Vdbe {
 */
 void sqlite3VdbeFreeCursor(Cursor*);
 void sqlite3VdbeSorterReset(Vdbe*);
-int sqlite3VdbeAggReset(sqlite *, Agg *, KeyInfo *);
+int sqlite3VdbeAggReset(sqlite3*, Agg *, KeyInfo *);
 void sqlite3VdbeKeylistFree(Keylist*);
 void sqliteVdbePopStack(Vdbe*,int);
 int sqlite3VdbeCursorMoveto(Cursor*);
index 1909c142e7144f90f3595efb56fcc13da6341fab..b238c7fe796675c7cc8076399d6d1c3ae25cccf8 100644 (file)
@@ -135,7 +135,7 @@ void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
 */
 int sqlite3_step(sqlite3_stmt *pStmt){
   Vdbe *p = (Vdbe*)pStmt;
-  sqlite *db;
+  sqlite3 *db;
   int rc;
 
   if( p==0 || p->magic!=VDBE_MAGIC_RUN ){
index ba81e1be373205f890571ff2623938f50a26c894..5e0b480be5693f036e9e94bd23787565dc2b5a86 100644 (file)
@@ -33,7 +33,7 @@ int sqlite3_vdbe_addop_trace = 0;
 /*
 ** Create a new virtual database engine.
 */
-Vdbe *sqlite3VdbeCreate(sqlite *db){
+Vdbe *sqlite3VdbeCreate(sqlite3 *db){
   Vdbe *p;
   p = sqliteMalloc( sizeof(Vdbe) );
   if( p==0 ) return 0;
@@ -451,7 +451,7 @@ void sqlite3VdbePrintOp(FILE *pOut, int pc, Op *pOp){
 int sqlite3VdbeList(
   Vdbe *p                   /* The VDBE */
 ){
-  sqlite *db = p->db;
+  sqlite3 *db = p->db;
   int i;
   int rc = SQLITE_OK;
 
@@ -698,7 +698,7 @@ void freeAggElem(AggElem *pElem, Agg *pAgg){
 ** delete the contents of the table used for aggregate information, ready
 ** for the next round of aggregate processing.
 */
-int sqlite3VdbeAggReset(sqlite *db, Agg *pAgg, KeyInfo *pKeyInfo){
+int sqlite3VdbeAggReset(sqlite3 *db, Agg *pAgg, KeyInfo *pKeyInfo){
   int rc = 0;
   BtCursor *pCsr = pAgg->pCsr;
 
@@ -925,7 +925,7 @@ int sqlite3VdbeSetColName(Vdbe *p, int idx, const char *zName, int N){
 ** write-transaction spanning more than one database file, this routine
 ** takes care of the master journal trickery.
 */
-static int vdbeCommit(sqlite *db){
+static int vdbeCommit(sqlite3 *db){
   int i;
   int nTrans = 0;  /* Number of databases with an active write-transaction */
   int rc = SQLITE_OK;
@@ -1137,7 +1137,7 @@ static void abortOtherActiveVdbes(Vdbe *pVdbe){
 ** This is a no-op if NDEBUG is defined.
 */
 #ifndef NDEBUG
-static void checkActiveVdbeCnt(sqlite *db){
+static void checkActiveVdbeCnt(sqlite3 *db){
   Vdbe *p;
   int cnt = 0;
   p = db->pVdbe;
@@ -1166,7 +1166,7 @@ static void checkActiveVdbeCnt(sqlite *db){
 ** means the close did not happen and needs to be repeated.
 */
 int sqlite3VdbeHalt(Vdbe *p){
-  sqlite *db = p->db;
+  sqlite3 *db = p->db;
   int i;
   int (*xFunc)(Btree *pBt) = 0;  /* Function to call on each btree backend */
 
@@ -1322,7 +1322,7 @@ int sqlite3VdbeReset(Vdbe *p){
 */
 int sqlite3VdbeFinalize(Vdbe *p){
   int rc = SQLITE_OK;
-  sqlite *db = p->db;
+  sqlite3 *db = p->db;
 
   if( p->magic==VDBE_MAGIC_RUN || p->magic==VDBE_MAGIC_HALT ){
     rc = sqlite3VdbeReset(p);
index 49091d4760dfd2460681a60f2cadcd978deea653..ec77360d681de94a7f616a3b9c94f2b3b00cea06 100644 (file)
@@ -12,7 +12,7 @@
 ** This module contains C code that generates VDBE code used to process
 ** the WHERE clause of SQL statements.
 **
-** $Id: where.c,v 1.112 2004/08/21 17:54:45 drh Exp $
+** $Id: where.c,v 1.113 2004/09/06 17:24:13 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -270,7 +270,7 @@ static Index *findSortingIndex(
   Index *pMatch;
   Index *pIdx;
   int sortOrder;
-  sqlite *db = pParse->db;
+  sqlite3 *db = pParse->db;
 
   assert( pOrderBy!=0 );
   assert( pOrderBy->nExpr>0 );