diff options
author | drh <drh@noemail.net> | 2006-01-03 00:33:50 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-01-03 00:33:50 +0000 |
commit | dddca28608a7affaa923cd7032ae42ed937e444c (patch) | |
tree | 6268513e43553f7921bf62169f0328cf3889c57c | |
parent | 88f474a9380d3a890d484497bc8a8beaf5877a93 (diff) | |
download | sqlite-dddca28608a7affaa923cd7032ae42ed937e444c.tar.gz sqlite-dddca28608a7affaa923cd7032ae42ed937e444c.zip |
The sqlite TCL command no longer returns the hex address of the sqlite3*
structure. Instead there is a new command in testfixture to find that
information. (CVS 2852)
FossilOrigin-Name: 70b228575e045bc56013aab945334203ceb31d8b
-rw-r--r-- | manifest | 60 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | src/tclsqlite.c | 13 | ||||
-rw-r--r-- | src/test1.c | 45 | ||||
-rw-r--r-- | test/alter.test | 5 | ||||
-rw-r--r-- | test/alter2.test | 8 | ||||
-rw-r--r-- | test/attach2.test | 5 | ||||
-rw-r--r-- | test/autoinc.test | 5 | ||||
-rw-r--r-- | test/bind.test | 5 | ||||
-rw-r--r-- | test/bindxfer.test | 5 | ||||
-rw-r--r-- | test/blob.test | 5 | ||||
-rw-r--r-- | test/capi2.test | 5 | ||||
-rw-r--r-- | test/capi3.test | 15 | ||||
-rw-r--r-- | test/capi3b.test | 8 | ||||
-rw-r--r-- | test/delete.test | 5 | ||||
-rw-r--r-- | test/delete2.test | 5 | ||||
-rw-r--r-- | test/enc2.test | 30 | ||||
-rw-r--r-- | test/func.test | 8 | ||||
-rw-r--r-- | test/interrupt.test | 5 | ||||
-rw-r--r-- | test/misc4.test | 5 | ||||
-rw-r--r-- | test/misuse.test | 12 | ||||
-rw-r--r-- | test/pragma.test | 12 | ||||
-rw-r--r-- | test/rollback.test | 5 | ||||
-rw-r--r-- | test/safety.test | 5 | ||||
-rw-r--r-- | test/tester.tcl | 5 | ||||
-rw-r--r-- | test/trace.test | 6 | ||||
-rw-r--r-- | test/vacuum.test | 4 |
27 files changed, 162 insertions, 131 deletions
@@ -1,5 +1,5 @@ -C Add\sthe\sxInMutex\smethod\sto\sthe\sos-layer\sswitch\sfor\stesting\swhether\sor\snot\nmutexes\sare\sused\scorrectly.\s(CVS\s2851) -D 2006-01-02T20:00:13 +C The\ssqlite\sTCL\scommand\sno\slonger\sreturns\sthe\shex\saddress\sof\sthe\ssqlite3*\nstructure.\s\sInstead\sthere\sis\sa\snew\scommand\sin\stestfixture\sto\sfind\sthat\ninformation.\s(CVS\s2852) +D 2006-01-03T00:33:50 F Makefile.in e3c6b3a38d734d41574c04f2fc90d18de2b87102 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -71,8 +71,8 @@ F src/shell.c 66b073375efbdee19045e7e0cd38b85f9aff71da F src/sqlite.h.in ba3a29daa6a16e054191ccb384a981964e882a1d F src/sqliteInt.h bb648c5274d67060cb13f0cd0da141aff1205358 F src/table.c 486dcfce532685b53b5a2b5da8bba0ded6fb2316 -F src/tclsqlite.c 230a367c50d84f15e92545f3d468acf192726696 -F src/test1.c 7374e6576e15a85f11d6032ea8a69d99643695b3 +F src/tclsqlite.c 124f822d6c55c5d95420672bf39fe3ba60ae1f76 +F src/test1.c 988dbac66c3ca92d69fbe0283d77e86cd6f73ce8 F src/test2.c 36390cdfc70c08e5ee0b466d0654a117f398bbff F src/test3.c 9742aa146eb750cab81c1d5605286c3a0eb88054 F src/test4.c a8fd681e139e1c61f22a77d07fc3a99cb28fff3f @@ -94,17 +94,17 @@ F src/vdbemem.c deba8d6e3727643924b210a8c531a496c2b8d386 F src/where.c 0296a20c2e2a39c0cb785efe471fd1958a5259f3 F tclinstaller.tcl 046e3624671962dc50f0481d7c25b38ef803eb42 F test/all.test 55706917a12cd616440d50c35323747b4a9f03c3 -F test/alter.test 9d6837a3d946b73df692b7cef2a7644d2e2f6bc6 -F test/alter2.test 60ba0a7057dc71ad630a1cc7c487104346849d50 +F test/alter.test b94b640063e725d062b2997bd2810ac39195c718 +F test/alter2.test cc0b8832e4e98605dbc26910efd4bb89abe59cb2 F test/alter3.test 6e144ea3dcc395afcc28e794bb532be83dc8fdcb F test/altermalloc.test 6e1f404ec021eb2ba6582e3c77b0a35cf206b7af F test/analyze.test 2f55535aa335785db1a2f97d3f3831c16c09f8b0 F test/attach.test dae07fa1554b618b9cc4c7bc349b3bc1a532180e -F test/attach2.test 609604393708c3d3227f7c316d15b25d015aa4dd +F test/attach2.test 0e6a7c54343c85dd877a1e86073a05176043ed40 F test/attach3.test 63013383adc4380af69779f34f4af19bd49f7cbe F test/attachmalloc.test cdb26c42850f04698377ccec05f5fa89d987837c F test/auth.test 973ae7274eae32c4453fbbcbd0ec2b80c5b1eeb3 -F test/autoinc.test ba46a006641a9036eabf52997b60c4156c8ed06e +F test/autoinc.test 60005a676e3e4e17dfa9dbd08aa0b76587ff97e3 F test/autovacuum.test 9471d58a08b14dc0d2c15b87583c46d1744343d6 F test/autovacuum_crash.test 05a63b8805b20cfba7ace82856ce4ccdda075a31 F test/autovacuum_ioerr.test 9cf27275ca47b72e188a47c53b61b6d583a01d24 @@ -113,9 +113,9 @@ F test/avtrans.test 507834a6e1ef4aeea9b8bc2b45f9246d7e66ad3f F test/between.test ca092fa28b665ca92172b182c6c360a92f7ca348 F test/bigfile.test ebc9ce9216e08bead63734ab816d0f27858f3b80 F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747 -F test/bind.test 7a516239aeb056aad5a36256d0b219373ad67fd9 -F test/bindxfer.test 856830e9e5552b9882c9d5c6647f90e25bdae4ac -F test/blob.test 0b4ee6fef7a50685b88d921e2992606999510881 +F test/bind.test 7c01e8a660e33586bc0c1d596d5a7a7f5e7523fe +F test/bindxfer.test b76bfb7df68bb0b238039f4543a84e9612291b54 +F test/blob.test 28c3b25150684ee3d108bb78cfb67a472deef2f0 F test/btree.test 8aa7424aeec844df990273fe36447e5d7e407261 F test/btree2.test dbce930b549d5ac883a7d8905c976209ea241db3 F test/btree4.test 3797b4305694c7af6828675b0f4b1424b8ca30e4 @@ -124,9 +124,9 @@ F test/btree6.test a5ede6bfbbb2ec8b27e62813612c0f28e8f3e027 F test/btree7.test a6d3b842db22af97dd14b989e90a2fd96066b72f F test/btree8.test fadc112bcbd6a0c622d34c813fc8a648eacf8804 F test/busy.test 0271c854738e23ad76e10d4096a698e5af29d211 -F test/capi2.test f897209386fb21cfdc9267595e0c667ebaca9164 -F test/capi3.test af46034e00e225eaef780930204a4f885bd40fa0 -F test/capi3b.test 5b6a66f9f295f79f443b5d3f33187fa5ef6cf336 +F test/capi2.test b9354d6c37e6f8f858c08952ebc9709712581221 +F test/capi3.test 1b8afa5c0b1851e3fc8a0de71c2e0de13e84fe60 +F test/capi3b.test 5f0bc94b104e11086b1103b20277e1910f59c7f4 F test/cast.test 2543165ced4249c89ce5f0352222df503a98b9e5 F test/check.test 8154b8ac0c56c34088168b8d87eee713fba2b31b F test/collate1.test add9454cef160677bb8b34148b8f277ce7f9f1c4 @@ -142,8 +142,8 @@ F test/crash.test 504a4eee0ce78f00d16a5a324e42964bd85164f5 F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2 F test/date.test 30ca15e608a45d868fd419c901795382efe27020 F test/default.test 252298e42a680146b1dd64f563b95bdf088d94fb -F test/delete.test e08ffb452f581d58703d0294242c9e2b8d091916 -F test/delete2.test e382b6a97787197eb8b93dd4ccd37797c3725ea3 +F test/delete.test 525a6953bc3978780cae35f3eaf1027cf4ce887d +F test/delete2.test d97a85b487f0ad2b391026ffade125549351f5cf F test/delete3.test 555e84a00a99230b7d049d477a324a631126a6ab F test/descidx1.test 466a9b87f3a7682156916dcbd5b77be55fd39d75 F test/descidx2.test f9f73c562932b81207faa525cd52acdfd2fc0482 @@ -151,11 +151,11 @@ F test/descidx3.test 56daed47e2eb91cef15a21a656691bb82a4699ba F test/diskfull.test d828d72adfc9e2d1a194d25996718c1989152cf9 F test/distinctagg.test 2b89d1c5220d966a30ba4b40430338669301188b F test/enc.test 7a03417a1051fe8bc6c7641cf4c8c3f7e0066d52 -F test/enc2.test c91d183cc9ba7f545fdc32e11d96ce507d07a11e +F test/enc2.test 6ea55732ddffd340f3d3a29cc33645e9ded481c7 F test/enc3.test f6a5f0b7b7f3a88f030d3143729b87cd5c86d837 F test/expr.test 06381174d8c25fbbfd9ed335fe0cde835d39123d F test/fkey1.test 153004438d51e6769fb1ce165f6313972d6263ce -F test/func.test e891bebf5a939fd45c9453ad35e2280f41a30687 +F test/func.test a7119afcc16abdf24b24486684fb888279008f75 F test/hook.test 3bae7892e04ba40f20e205027c3ba343e46d22ff F test/in.test cead6165aebbe0d451bb2263a307173acfeb6240 F test/index.test 3871c47ec475f779f0b99dc36a3d177951995712 @@ -164,7 +164,7 @@ F test/index3.test f66718cd92ce1216819d47e6a156755e4b2c4ca1 F test/insert.test b0a89e1568fe9890758f8f2b43b68e840e8f1a1a F test/insert2.test 5a20e1ace5fa0800b58d28284212290189b49aed F test/insert3.test c67f0240b1c17e71fa2ed8bb6de064928f549f95 -F test/interrupt.test 170f87c2819f0e56c76e0a754949ea103d05009c +F test/interrupt.test cd24dc5bedd02325be4bfa5d6209fae01c465157 F test/intpkey.test af4fd826c4784ec5c93b444de07adea0254d0d30 F test/ioerr.test c3f71a60be73404bc5ae344e171b505d9af49320 F test/join.test db3802739fb695bdfa2e88805e3d64ec5ffbebd1 @@ -193,24 +193,24 @@ F test/minmax.test cad887abca5504396718e2cd5729ca40758743e8 F test/misc1.test 7aabf32e698ef7cc1253f5e7fc216c65870ce485 F test/misc2.test 5c699af2fede2694736a9f45aea7e2f052686e15 F test/misc3.test 7bd937e2c62bcc6be71939faf068d506467b1e03 -F test/misc4.test fbb81c1d520f34deea819a5d94d787d3d38dc35b +F test/misc4.test b043a05dea037cca5989f3ae09552fa16119bc80 F test/misc5.test ed79d4c892a4995b29d03d6baebe6457bfb35a9e -F test/misuse.test 1c7fee3c4c0cb4008717ecccf5c72281fac0008e +F test/misuse.test 30b3a458e5a70c31e74c291937b6c82204c59f33 F test/notnull.test 7a08117a71e74b0321aaa937dbeb41a09d6eb1d0 F test/null.test 012fe5455f4fc3102490b4bad373a674e5741fdd F test/pager.test 1579e8f07291ae8e24db62ffade5c101c3e76597 F test/pager2.test 49c0f57c7da0b060f0486b85fdd074025caa694e F test/pager3.test 2323bf27fd5bd887b580247e5bce500ceee994b4 F test/pagesize.test cbc6a312b6f6c0f02619b189985df2a14164b690 -F test/pragma.test 95ea907adf68459e1be6f310c9ae94d1d59c465b +F test/pragma.test 8759b46702f6d8ee4f5dd520216c69dbc9080b60 F test/printf.test 9e10c74e16bf889f8495ddb3d6f5f891e75ff1b7 F test/progress.test 16496001da445e6534afb94562c286708316d82f x F test/quick.test 24ef81e4e9c1784e7f081e7ce4576c15659b97a7 F test/quote.test 5891f2338980916cf7415484b4ce785294044adb F test/reindex.test 38b138abe36bf9a08c791ed44d9f76cd6b97b78b -F test/rollback.test 94cd981ee3a627d9f6466f69dcf1f7dbfe695d7a +F test/rollback.test fc6be5a5e4b1347fd96777c65484a24fc75e8f0e F test/rowid.test 040a3bef06f970c45f5fcd14b2355f7f4d62f0cf -F test/safety.test 907b64fee719554a3622853812af3886fddbbb4f +F test/safety.test 4a06934e45d03b8b50ebcd8d174eb0367d2fd851 F test/schema.test 8a2ae440fb15f5798a68059e8746402f3137be46 F test/select1.test 386cc42da2d0fade5dfb25c85118009c0ef26637 F test/select2.test f3c2678c3a9f3cf08ec4988a3845bda64be6d9e3 @@ -228,7 +228,7 @@ F test/table.test 149b76a28bbe2a1cd799232e4ae5133881e1902a F test/tableapi.test 6a66d58b37d46dc0f2b3c7d4bd2617d209399bd1 F test/tclsqlite.test 19578d32a7692311918caf0ae3521d19525bcb62 F test/temptable.test 7927261befdbc7b0a7ffebb85ecc70a74fa7b15b -F test/tester.tcl fae9e5b9ca4cfda10a6a52e95f7ebf731e52f3e5 +F test/tester.tcl 9ab7dc33002fae680bf5f9a117a2747b01662069 F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35 F test/threadtest1.c 6029d9c5567db28e6dc908a0c63099c3ba6c383b F test/threadtest2.c 97a830d53c24c42290501fdfba4a6e5bdd34748b @@ -243,7 +243,7 @@ F test/tkt1514.test baa587a69fa2e8d575ebdaf1460f711281dcba49 F test/tkt1536.test 83ff7a7b6e248016f8d682d4f7a4ae114070d466 F test/tkt1537.test 8e6c8399b5be8abeaac18ca17133990806b175fa F test/tkt1567.test 18023cc3626a365f0118e17b66decedec93b1a6f -F test/trace.test 9fd28695c463b90c2d32c387a432e01eb26e8ccf +F test/trace.test 75ffc1b992c780d054748a656e3e7fd674f18567 F test/trans.test abd2f74c5685b156d79438e6e812db5bf984eea4 F test/trigger1.test 152aed5a1fa90709fe171f2ca501a6b7f7901479 F test/trigger2.test dea71f4b05e22896e72527278bc8ef71b7475bf2 @@ -258,7 +258,7 @@ F test/types3.test e5f789503849294de74a23b433168e8211523a25 F test/unique.test 0253c4227a5dc533e312202ce21ecfad18058d18 F test/update.test 7669ca789d62c258b678e8aa7a22a57eac10f2cf F test/utf16.test 5fb019e09601774743858ef7380b6c02103ff120 -F test/vacuum.test 5d4857ae2afc9c20d0edb8acc58bdc8d630126a9 +F test/vacuum.test 61e2b6e7dcf0eec90cdf6cc63e30321c8b037b1f F test/vacuum2.test 5d77e98c458bcdbeecc6327de5107179ba1aa095 F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102 F test/view.test ce0f0ad39fa4a3572acffcf1e634850ee151aae0 @@ -333,7 +333,7 @@ F www/tclsqlite.tcl ddcf912ea48695603c8ed7efb29f0812ef8d1b49 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 2622c5242b0cba5bc19f190a7c209ab9ed8f57e0 -R 9a09811315517f7461beef7a4469c2f0 +P a582b159595ff8d31c81e9b3044711d6590d3f0e +R 3443cda8c76c7eb6b12365da80f51486 U drh -Z c6af3ad936269fab04fee23696f1a4d8 +Z e8e69e33240623256267b54701f3d2e2 diff --git a/manifest.uuid b/manifest.uuid index aec525cee..1af600fd5 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a582b159595ff8d31c81e9b3044711d6590d3f0e
\ No newline at end of file +70b228575e045bc56013aab945334203ceb31d8b
\ No newline at end of file diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 5a97da069..1379ae5fe 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -11,7 +11,7 @@ ************************************************************************* ** A TCL Interface to SQLite ** -** $Id: tclsqlite.c,v 1.142 2005/12/30 16:28:02 danielk1977 Exp $ +** $Id: tclsqlite.c,v 1.143 2006/01/03 00:33:50 drh Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ @@ -89,7 +89,7 @@ struct SqlPreparedStmt { */ typedef struct SqliteDb SqliteDb; struct SqliteDb { - sqlite3 *db; /* The "real" database structure */ + sqlite3 *db; /* The "real" database structure. MUST BE FIRST */ Tcl_Interp *interp; /* The interpreter used for this database */ char *zBusy; /* The busy callback routine */ char *zCommit; /* The commit hook callback routine */ @@ -2008,7 +2008,6 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ const char *zArg; char *zErrMsg; const char *zFile; - char zBuf[80]; if( objc==2 ){ zArg = Tcl_GetStringFromObj(objv[1], 0); if( strcmp(zArg,"-version")==0 ){ @@ -2076,14 +2075,6 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ zArg = Tcl_GetStringFromObj(objv[1], 0); Tcl_CreateObjCommand(interp, zArg, DbObjCmd, (char*)p, DbDeleteCmd); - /* The return value is the value of the sqlite* pointer - */ - sprintf(zBuf, "%p", p->db); - if( strncmp(zBuf,"0x",2) ){ - sprintf(zBuf, "0x%p", p->db); - } - Tcl_AppendResult(interp, zBuf, 0); - /* If compiled with SQLITE_TEST turned on, then register the "md5sum" ** SQL function. */ diff --git a/src/test1.c b/src/test1.c index af05a2f35..263666ca9 100644 --- a/src/test1.c +++ b/src/test1.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test1.c,v 1.178 2005/12/30 16:28:02 danielk1977 Exp $ +** $Id: test1.c,v 1.179 2006/01/03 00:33:50 drh Exp $ */ #include "sqliteInt.h" #include "tcl.h" @@ -21,6 +21,48 @@ #include <stdlib.h> #include <string.h> +/* +** This is a copy of the first part of the SqliteDb structure in +** tclsqlite.c. We need it here so that the get_sqlite_pointer routine +** can extract the sqlite3* pointer from an existing Tcl SQLite +** connection. +*/ +struct SqliteDb { + sqlite3 *db; +}; + +/* +** A TCL command that returns the address of the sqlite* pointer +** for an sqlite connection instance. Bad things happen if the +** input is not an sqlite connection. +*/ +static int get_sqlite_pointer( + void * clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *CONST objv[] +){ + struct SqliteDb *p; + Tcl_CmdInfo cmdInfo; + char zBuf[100]; + if( objc!=2 ){ + Tcl_WrongNumArgs(interp, 1, objv, "SQLITE-CONNECTION"); + return TCL_ERROR; + } + if( !Tcl_GetCommandInfo(interp, Tcl_GetString(objv[1]), &cmdInfo) ){ + Tcl_AppendResult(interp, "command not found: ", + Tcl_GetString(objv[1]), (char*)0); + return TCL_ERROR; + } + p = (struct SqliteDb*)cmdInfo.objClientData; + sprintf(zBuf, "%p", p->db); + if( strncmp(zBuf,"0x",2) ){ + sprintf(zBuf, "0x%p", p->db); + } + Tcl_AppendResult(interp, zBuf, 0); + return TCL_OK; +} + const char *sqlite3TestErrorName(int rc){ const char *zName = 0; switch( rc ){ @@ -3219,6 +3261,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){ Tcl_ObjCmdProc *xProc; void *clientData; } aObjCmd[] = { + { "sqlite3_connection_pointer", get_sqlite_pointer, 0 }, { "sqlite3_bind_int", test_bind_int, 0 }, { "sqlite3_bind_int64", test_bind_int64, 0 }, { "sqlite3_bind_double", test_bind_double, 0 }, diff --git a/test/alter.test b/test/alter.test index 45d20f5e2..32482e8ec 100644 --- a/test/alter.test +++ b/test/alter.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is testing the ALTER TABLE statement. # -# $Id: alter.test,v 1.11 2005/03/29 03:11:00 danielk1977 Exp $ +# $Id: alter.test,v 1.12 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] @@ -144,7 +144,8 @@ do_test alter-1.5 { ifcapable tempdb { do_test alter-1.6 { db close - set DB [sqlite3 db test.db] + sqlite3 db test.db + set DB [sqlite3_connection_pointer db] execsql { CREATE TEMP TABLE objlist(type, name, tbl_name); INSERT INTO objlist SELECT type, name, tbl_name FROM sqlite_master; diff --git a/test/alter2.test b/test/alter2.test index bf38f3bd9..98d74f614 100644 --- a/test/alter2.test +++ b/test/alter2.test @@ -13,7 +13,7 @@ # file format change that may be used in the future to implement # "ALTER TABLE ... ADD COLUMN". # -# $Id: alter2.test,v 1.4 2005/03/10 12:52:47 drh Exp $ +# $Id: alter2.test,v 1.5 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] @@ -250,8 +250,7 @@ do_test alter2-4.3 { sqlite3_errcode $::DB } {SQLITE_ERROR} do_test alter2-4.4 { - db close - set ::DB [sqlite3 db test.db] + set ::DB [sqlite3_connection_pointer db] catchsql { SELECT * FROM sqlite_master; } @@ -284,7 +283,8 @@ do_test alter2-5.3 { do_test alter2-6.1 { db close set_file_format 2 - set ::DB [sqlite3 db test.db] + sqlite3 db test.db + set ::DB [sqlite3_connection_pointer db] get_file_format } {2} do_test alter2-6.2 { diff --git a/test/attach2.test b/test/attach2.test index d9b034017..2d70c3bd0 100644 --- a/test/attach2.test +++ b/test/attach2.test @@ -12,7 +12,7 @@ # focus of this script is testing the ATTACH and DETACH commands # and related functionality. # -# $Id: attach2.test,v 1.34 2005/12/30 16:28:02 danielk1977 Exp $ +# $Id: attach2.test,v 1.35 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] @@ -129,8 +129,7 @@ do_test attach2-2.12 { # Ticket #574: Make sure it works using the non-callback API # do_test attach2-3.1 { - db close - set DB [sqlite3 db test.db] + set DB [sqlite3_connection_pointer db] set rc [catch {sqlite3_prepare $DB "ATTACH 'test2.db' AS t2" -1 TAIL} VM] if {$rc} {lappend rc $VM} sqlite3_step $VM diff --git a/test/autoinc.test b/test/autoinc.test index ba7c94d25..134b4d828 100644 --- a/test/autoinc.test +++ b/test/autoinc.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is testing the AUTOINCREMENT features. # -# $Id: autoinc.test,v 1.8 2005/11/14 22:29:06 drh Exp $ +# $Id: autoinc.test,v 1.9 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] @@ -512,7 +512,8 @@ do_test autoinc-8.1 { catch {db2 close} catch {db close} file delete -force test.db - set DB [sqlite3 db test.db] + sqlite3 db test.db + set DB [sqlite3_connection_pointer db] set STMT [sqlite3_prepare $DB { CREATE TABLE t1( x INTEGER PRIMARY KEY AUTOINCREMENT diff --git a/test/bind.test b/test/bind.test index 6cc803432..328538885 100644 --- a/test/bind.test +++ b/test/bind.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the sqlite_bind API. # -# $Id: bind.test,v 1.35 2005/12/09 20:54:35 drh Exp $ +# $Id: bind.test,v 1.36 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] @@ -35,8 +35,7 @@ proc sqlite_step {stmt N VALS COLS} { } do_test bind-1.1 { - db close - set DB [sqlite3 db test.db] + set DB [sqlite3_connection_pointer db] execsql {CREATE TABLE t1(a,b,c);} set VM [sqlite3_prepare $DB {INSERT INTO t1 VALUES(:1,?,:abc)} -1 TAIL] set TAIL diff --git a/test/bindxfer.test b/test/bindxfer.test index 0d0bea0de..5b73810be 100644 --- a/test/bindxfer.test +++ b/test/bindxfer.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the sqlite_transfer_bindings() API. # -# $Id: bindxfer.test,v 1.1 2005/04/22 02:38:39 drh Exp $ +# $Id: bindxfer.test,v 1.2 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] @@ -35,8 +35,7 @@ proc sqlite_step {stmt VALS COLS} { } do_test bindxfer-1.1 { - db close - set DB [sqlite3 db test.db] + set DB [sqlite3_connection_pointer db] execsql {CREATE TABLE t1(a,b,c);} set VM1 [sqlite3_prepare $DB {SELECT ?, ?, ?} -1 TAIL] set TAIL diff --git a/test/blob.test b/test/blob.test index 4e49f3864..b3c22b487 100644 --- a/test/blob.test +++ b/test/blob.test @@ -10,7 +10,7 @@ #*********************************************************************** # This file implements regression tests for SQLite library. # -# $Id: blob.test,v 1.4 2005/08/23 11:17:59 drh Exp $ +# $Id: blob.test,v 1.5 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -104,7 +104,8 @@ do_test blob-2.4 { # Try to bind a blob value to a prepared statement. do_test blob-3.0 { - set DB [sqlite3 db2 test.db] + sqlite3 db2 test.db + set DB [sqlite3_connection_pointer db2] set STMT [sqlite3_prepare $DB "DELETE FROM t1 WHERE a = ?" -1 DUMMY] sqlite3_bind_blob $STMT 1 "\x12\x34\x56" 3 sqlite3_step $STMT diff --git a/test/capi2.test b/test/capi2.test index c54c879c8..3d52d0b6e 100644 --- a/test/capi2.test +++ b/test/capi2.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the callback-free C/C++ API. # -# $Id: capi2.test,v 1.26 2005/03/29 03:11:00 danielk1977 Exp $ +# $Id: capi2.test,v 1.27 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] @@ -48,8 +48,7 @@ proc get_column_names {STMT} { # Check basic functionality # do_test capi2-1.1 { - db close - set DB [sqlite3 db test.db] + set DB [sqlite3_connection_pointer db] execsql {CREATE TABLE t1(a,b,c)} set VM [sqlite3_prepare $DB {SELECT name, rowid FROM sqlite_master} -1 TAIL] set TAIL diff --git a/test/capi3.test b/test/capi3.test index 8f2a8da43..69af41535 100644 --- a/test/capi3.test +++ b/test/capi3.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the callback-free C/C++ API. # -# $Id: capi3.test,v 1.35 2005/12/16 01:06:18 drh Exp $ +# $Id: capi3.test,v 1.36 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] @@ -51,8 +51,7 @@ proc utf8 {str} { # capi3-6.*: Test that sqlite3_close fails if there are outstanding VMs. # -db close -set DB [sqlite3 db test.db] +set DB [sqlite3_connection_pointer db] do_test capi3-1.0 { sqlite3_get_autocommit $DB @@ -463,7 +462,8 @@ set ::ENC [execsql {pragma encoding}] db close do_test capi3-6.0 { - set DB [sqlite3_open test.db] + sqlite3 db test.db + set DB [sqlite3_connection_pointer db] sqlite3_key $DB xyzzy set sql {SELECT a FROM t1 order by rowid} set STMT [sqlite3_prepare $DB $sql -1 TAIL] @@ -482,6 +482,7 @@ do_test capi3-6.3 { do_test capi3-6.4 { sqlite3_close $DB } {SQLITE_OK} +db close if {![sqlite3 -has-codec]} { # Test what happens when the library encounters a newer file format. @@ -610,7 +611,8 @@ foreach {code english} $code2english { if {[info command sqlite_malloc_stat]!=""} { set sqlite_malloc_fail 1 do_test capi3-10-1 { - set ::DB [sqlite3 db test.db] + sqlite3 db test.db + set DB [sqlite3_connection_pointer db] sqlite_malloc_fail 1 catchsql { select * from sqlite_master; @@ -631,7 +633,8 @@ sqlite_malloc_fail 0 # The following tests - capi3-11.* - test that a COMMIT or ROLLBACK # statement issued while there are still outstanding VMs that are part of # the transaction fails. -set DB [sqlite3 db test.db] +sqlite3 db test.db +set DB [sqlite3_connection_pointer db] sqlite_register_test_function $DB func do_test capi3-11.1 { execsql { diff --git a/test/capi3b.test b/test/capi3b.test index 3182970f6..950d14c4f 100644 --- a/test/capi3b.test +++ b/test/capi3b.test @@ -13,16 +13,16 @@ # particular the behavior of sqlite3_step() when trying to commit # with lock contention. # -# $Id: capi3b.test,v 1.2 2004/09/03 00:27:57 drh Exp $ +# $Id: capi3b.test,v 1.3 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] source $testdir/tester.tcl -db close -set DB [sqlite3 db test.db] -set DB2 [sqlite3 db2 test.db] +set DB [sqlite3_connection_pointer db] +sqlite3 db2 test.db +set DB2 [sqlite3_connection_pointer db2] # Create some data in the database # diff --git a/test/delete.test b/test/delete.test index a3c1ebe49..0409ba912 100644 --- a/test/delete.test +++ b/test/delete.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing the DELETE FROM statement. # -# $Id: delete.test,v 1.20 2005/10/05 11:35:09 drh Exp $ +# $Id: delete.test,v 1.21 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -277,7 +277,8 @@ do_test delete-8.0 { db close catch {file attributes test.db -permissions 0444} catch {file attributes test.db -readonly 1} -set ::DB [sqlite3 db test.db] +sqlite3 db test.db +set ::DB [sqlite3_connection_pointer db] do_test delete-8.1 { catchsql { DELETE FROM t3; diff --git a/test/delete2.test b/test/delete2.test index c7e079339..52ff429b5 100644 --- a/test/delete2.test +++ b/test/delete2.test @@ -29,7 +29,7 @@ # The solution to the problem was to detect that the table is locked # before the index entry is deleted. # -# $Id: delete2.test,v 1.4 2004/11/22 10:02:23 danielk1977 Exp $ +# $Id: delete2.test,v 1.5 2006/01/03 00:33:50 drh Exp $ # set testdir [file dirname $argv0] @@ -38,8 +38,7 @@ source $testdir/tester.tcl # Create a table that has an index. # do_test delete2-1.1 { - db close - set DB [sqlite3 db test.db] + set DB [sqlite3_connection_pointer db] execsql { CREATE TABLE q(s string, id string, constraint pk_q primary key(id)); BEGIN; diff --git a/test/enc2.test b/test/enc2.test index c624699ed..d6b16a094 100644 --- a/test/enc2.test +++ b/test/enc2.test @@ -13,7 +13,7 @@ # various suported unicode encodings (UTF-8, UTF-16, UTF-16le and # UTF-16be). # -# $Id: enc2.test,v 1.24 2005/12/14 20:11:31 drh Exp $ +# $Id: enc2.test,v 1.25 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -71,7 +71,7 @@ proc run_test_script {t enc} { # Open the database and pull out a (the) row. do_test $t.1 { - set DB [sqlite3 db test.db] + sqlite3 db test.db; set DB [sqlite3_connection_pointer db] execsql {SELECT * FROM t1} } {one I 1} @@ -190,7 +190,7 @@ proc test_collate {enc lhs rhs} { } file delete -force test.db -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] do_test enc2-5.0 { execsql { CREATE TABLE t5(a); @@ -219,7 +219,7 @@ do_test enc2-5.3 { db close file delete -force test.db -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] execsql {pragma encoding = 'UTF-16LE'} do_test enc2-5.4 { execsql { @@ -249,7 +249,7 @@ do_test enc2-5.7 { db close file delete -force test.db -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] execsql {pragma encoding = 'UTF-16BE'} do_test enc2-5.8 { execsql { @@ -297,7 +297,7 @@ db close file delete -force test.db do_test enc2-5.15 { - set ::DB [sqlite3 db test.db] + sqlite3 db test.db; set ::DB [sqlite3_connection_pointer db] add_test_collate_needed $::DB set ::sqlite_last_needed_collation } {} @@ -316,7 +316,7 @@ proc test_function {enc arg} { } file delete -force test.db -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] execsql {pragma encoding = 'UTF-8'} do_test enc2-6.0 { execsql { @@ -331,7 +331,7 @@ do_test enc2-6.1 { } } {{UTF-8 sqlite}} db close -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] do_test enc2-6.2 { add_test_function $DB 0 1 0 execsql { @@ -339,7 +339,7 @@ do_test enc2-6.2 { } } {{UTF-16LE sqlite}} db close -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] do_test enc2-6.3 { add_test_function $DB 0 0 1 execsql { @@ -349,7 +349,7 @@ do_test enc2-6.3 { db close file delete -force test.db -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] execsql {pragma encoding = 'UTF-16LE'} do_test enc2-6.3 { execsql { @@ -364,7 +364,7 @@ do_test enc2-6.4 { } } {{UTF-16LE sqlite}} db close -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] do_test enc2-6.5 { add_test_function $DB 0 1 0 execsql { @@ -372,7 +372,7 @@ do_test enc2-6.5 { } } {{UTF-16LE sqlite}} db close -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] do_test enc2-6.6 { add_test_function $DB 0 0 1 execsql { @@ -382,7 +382,7 @@ do_test enc2-6.6 { db close file delete -force test.db -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] execsql {pragma encoding = 'UTF-16BE'} do_test enc2-6.7 { execsql { @@ -397,7 +397,7 @@ do_test enc2-6.8 { } } {{UTF-16BE sqlite}} db close -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] do_test enc2-6.9 { add_test_function $DB 0 1 0 execsql { @@ -405,7 +405,7 @@ do_test enc2-6.9 { } } {{UTF-16LE sqlite}} db close -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] do_test enc2-6.10 { add_test_function $DB 0 0 1 execsql { diff --git a/test/func.test b/test/func.test index 5b95d021c..e0428b998 100644 --- a/test/func.test +++ b/test/func.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing built-in functions. # -# $Id: func.test,v 1.42 2005/11/14 22:29:06 drh Exp $ +# $Id: func.test,v 1.43 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -295,8 +295,7 @@ do_test func-9.1 { # the user-defined SQL function APIs that are not used by the built-in # functions. # -db close -set ::DB [sqlite3 db test.db] +set ::DB [sqlite3_connection_pointer db] sqlite_register_test_function $::DB testfunc do_test func-10.1 { catchsql { @@ -441,8 +440,7 @@ do_test func-13.6 { # Test that auxilary data is preserved between calls for SQL variables. do_test func-13.7 { - db close - set DB [sqlite3 db test.db] + set DB [sqlite3_connection_pointer db] set sql "SELECT test_auxdata( ? , a ) FROM t4;" set STMT [sqlite3_prepare $DB $sql -1 TAIL] sqlite3_bind_text $STMT 1 hello -1 diff --git a/test/interrupt.test b/test/interrupt.test index ba87d2907..f5ecbf1fe 100644 --- a/test/interrupt.test +++ b/test/interrupt.test @@ -11,13 +11,12 @@ # This file implements regression tests for SQLite library. The # focus of this script is the sqlite_interrupt() API. # -# $Id: interrupt.test,v 1.11 2005/03/29 03:11:00 danielk1977 Exp $ +# $Id: interrupt.test,v 1.12 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl -db close -set DB [sqlite3 db test.db] +set DB [sqlite3_connection_pointer db] # Compute a checksum on the entire database. # diff --git a/test/misc4.test b/test/misc4.test index 9d7d79799..bf3734fa4 100644 --- a/test/misc4.test +++ b/test/misc4.test @@ -13,7 +13,7 @@ # This file implements tests for miscellanous features that were # left out of other test files. # -# $Id: misc4.test,v 1.20 2005/09/08 10:37:01 drh Exp $ +# $Id: misc4.test,v 1.21 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -22,8 +22,7 @@ source $testdir/tester.tcl # a rollback. Then try to execute the prepared statement. # do_test misc4-1.1 { - db close - set DB [sqlite3 db test.db] + set DB [sqlite3_connection_pointer db] execsql { CREATE TABLE t1(x); INSERT INTO t1 VALUES(1); diff --git a/test/misuse.test b/test/misuse.test index 8d96af6f9..3734aa01c 100644 --- a/test/misuse.test +++ b/test/misuse.test @@ -13,7 +13,7 @@ # This file implements tests for the SQLITE_MISUSE detection logic. # This test file leaks memory and file descriptors. # -# $Id: misuse.test,v 1.10 2005/01/24 10:26:00 danielk1977 Exp $ +# $Id: misuse.test,v 1.11 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -41,7 +41,7 @@ do_test misuse-1.1 { db close catch {file delete -force test2.db} catch {file delete -force test2.db-journal} - set ::DB [sqlite3 db test2.db] + sqlite3 db test2.db; set ::DB [sqlite3_connection_pointer db] execsql { CREATE TABLE t1(a,b); INSERT INTO t1 VALUES(1,2); @@ -89,7 +89,7 @@ do_test misuse-1.6 { # do_test misuse-2.1 { db close - set ::DB [sqlite3 db test2.db] + sqlite3 db test2.db; set ::DB [sqlite3_connection_pointer db] execsql { SELECT * FROM t1 } @@ -121,7 +121,7 @@ do_test misuse-2.5 { # do_test misuse-3.1 { db close - set ::DB [sqlite3 db test2.db] + sqlite3 db test2.db; set ::DB [sqlite3_connection_pointer db] execsql { SELECT * FROM t1 } @@ -155,7 +155,7 @@ do_test misuse-3.5 { # VMs. The sqlite3_close call would return SQLITE_BUSY. do_test misuse-4.1 { db close - set ::DB [sqlite3 db test2.db] + sqlite3 db test2.db; set ::DB [sqlite3_connection_pointer db] execsql { SELECT * FROM t1 } @@ -188,7 +188,7 @@ do_test misuse-4.5 { # do_test misuse-5.1 { db close - set ::DB [sqlite3 db test2.db] + sqlite3 db test2.db; set ::DB [sqlite3_connection_pointer db] execsql { SELECT * FROM t1 } diff --git a/test/pragma.test b/test/pragma.test index 0aba19acc..1c5f7d4b8 100644 --- a/test/pragma.test +++ b/test/pragma.test @@ -12,7 +12,7 @@ # # This file implements tests for the PRAGMA command. # -# $Id: pragma.test,v 1.36 2005/05/22 20:30:39 drh Exp $ +# $Id: pragma.test,v 1.37 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -38,7 +38,7 @@ source $testdir/tester.tcl # db close file delete test.db -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] ifcapable pager_pragmas { do_test pragma-1.1 { @@ -109,7 +109,7 @@ do_test pragma-1.8 { } {123 123 2} do_test pragma-1.9.1 { db close - set ::DB [sqlite3 db test.db] + sqlite3 db test.db; set ::DB [sqlite3_connection_pointer db] execsql { PRAGMA cache_size; PRAGMA default_cache_size; @@ -144,7 +144,7 @@ do_test pragma-1.11 { } {123 123 2} do_test pragma-1.12 { db close - set ::DB [sqlite3 db test.db] + sqlite3 db test.db; set ::DB [sqlite3_connection_pointer db] execsql { PRAGMA cache_size; PRAGMA default_cache_size; @@ -462,7 +462,7 @@ do_test pragma-8.1.6 { # to reload the schema. This has to be done using the C-API test functions, # because the TCL API accounts for SCHEMA_ERROR and retries the query. do_test pragma-8.1.7 { - set ::DB2 [sqlite3 db2 test.db] + sqlite3 db2 test.db; set ::DB2 [sqlite3_connection_pointer db2] execsql { SELECT * FROM t4; } db2 @@ -504,7 +504,7 @@ do_test pragma-8.1.13 { # And check that modifying the schema-version in an attached database # forces the second connection to reload the schema. do_test pragma-8.1.14 { - set ::DB2 [sqlite3 db2 test.db] + sqlite3 db2 test.db; set ::DB2 [sqlite3_connection_pointer db2] execsql { ATTACH 'test2.db' AS aux; SELECT * FROM aux.t1; diff --git a/test/rollback.test b/test/rollback.test index b73400fa2..820ad4b68 100644 --- a/test/rollback.test +++ b/test/rollback.test @@ -13,13 +13,12 @@ # caused by an ON CONFLICT ROLLBACK clause aborts any other pending # statements. # -# $Id: rollback.test,v 1.2 2005/01/12 13:04:55 danielk1977 Exp $ +# $Id: rollback.test,v 1.3 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl -db close -set DB [sqlite3 db test.db] +set DB [sqlite3_connection_pointer db] do_test rollback-1.1 { execsql { diff --git a/test/safety.test b/test/safety.test index a12cd84b2..fb8c56cbd 100644 --- a/test/safety.test +++ b/test/safety.test @@ -13,14 +13,13 @@ # functions. Those routines are not strictly necessary - they are # designed to detect misuse of the library. # -# $Id: safety.test,v 1.1 2005/01/11 15:28:33 drh Exp $ +# $Id: safety.test,v 1.2 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl do_test safety-1.1 { - db close - set DB [sqlite3 db test.db] + set DB [sqlite3_connection_pointer db] db eval {CREATE TABLE t1(a)} sqlite_set_magic $DB SQLITE_MAGIC_BUSY catchsql { diff --git a/test/tester.tcl b/test/tester.tcl index 4edee941d..3d011b918 100644 --- a/test/tester.tcl +++ b/test/tester.tcl @@ -11,7 +11,7 @@ # This file implements some common TCL routines used for regression # testing the SQLite library # -# $Id: tester.tcl,v 1.55 2005/12/30 16:28:02 danielk1977 Exp $ +# $Id: tester.tcl,v 1.56 2006/01/03 00:33:50 drh Exp $ # Make sure tclsqlite3 was compiled correctly. Abort now with an # error message if not. @@ -61,7 +61,8 @@ if {[sqlite3 -has-codec] && [info command sqlite_orig]==""} { catch {db close} file delete -force test.db file delete -force test.db-journal -set ::DB [sqlite3 db ./test.db] +sqlite3 db ./test.db +set ::DB [sqlite3_connection_pointer db] if {[info exists ::SETUP_SQL]} { db eval $::SETUP_SQL } diff --git a/test/trace.test b/test/trace.test index da81904ec..2cdd9619a 100644 --- a/test/trace.test +++ b/test/trace.test @@ -12,7 +12,7 @@ # # This file implements tests for the "sqlite3_trace()" API. # -# $Id: trace.test,v 1.5 2005/08/29 23:00:05 drh Exp $ +# $Id: trace.test,v 1.6 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -53,7 +53,7 @@ do_test trace-1.5 { # happens on each execution. # db close -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] do_test trace-2.1 { set STMT [sqlite3_prepare $DB {INSERT INTO t1 VALUES(2,3)} -1 TAIL] db trace trace_proc @@ -116,7 +116,7 @@ do_test trace-3.5 { # happens on each execution. # db close -set DB [sqlite3 db test.db] +sqlite3 db test.db; set DB [sqlite3_connection_pointer db] do_test trace-4.1 { set STMT [sqlite3_prepare $DB {INSERT INTO t2 VALUES(2,3)} -1 TAIL] db trace trace_proc diff --git a/test/vacuum.test b/test/vacuum.test index a5d9d151b..63eee972f 100644 --- a/test/vacuum.test +++ b/test/vacuum.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing the VACUUM statement. # -# $Id: vacuum.test,v 1.35 2005/03/29 03:11:00 danielk1977 Exp $ +# $Id: vacuum.test,v 1.36 2006/01/03 00:33:50 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -217,7 +217,7 @@ do_test vacuum-3.1 { # do_test vacuum-4.1 { db close - set DB [sqlite3 db test.db] + sqlite3 db test.db; set DB [sqlite3_connection_pointer db] set VM [sqlite3_prepare $DB {VACUUM} -1 TAIL] sqlite3_step $VM } {SQLITE_DONE} |