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