diff --git a/manifest b/manifest index 651541bf00..b2efeec10f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Rename\ssome\svariables\sto\savoid\shiding\sothers.\sAlso\sadd\s"static"\sto\stwo\sfunction\ssignatures\sthat\swere\smissing\sit.\s(CVS\s3024) -D 2006-01-24T12:09:18 +C Return\scode\swas\sbeing\sdropped\sbecause\sof\soverridden\svariable\sin\sOP_IsUnique.\sFix\sthis\sand\sthe\stest\slogic\sproblem\sthat\shid\sit.\s(CVS\s3025) +D 2006-01-24T13:09:33 F Makefile.in 53841eb72e9eeb6030a8ce28c2595a92f440fd10 F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -48,7 +48,7 @@ F src/hash.c 8747cf51d12de46512880dfcf1b68b4e24072863 F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84 F src/insert.c 7e931b7f06afbcefcbbaab175c02eff8268db33f F src/legacy.c 86b669707b3cefd570e34154e2f6457547d1df4f -F src/main.c 439168db0a830efd0b9e7325aff39adc5524a1b5 +F src/main.c dc3fc9b02b1a022574d6e12d25abe58b93b85b1f F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217 F src/os.c 59f05de8c5777c34876607114a2fbe55ae578235 F src/os.h 93035a0e3b9dd05cdd0aaef32ea28ca28e02fe78 @@ -59,7 +59,7 @@ F src/os_unix.c b25eca667f926d24b542fb20378b3665feccfe2b F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e F src/os_win.c 566bf7b41b72556fd7dca390bceaa2769dc395e9 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b -F src/pager.c c4d18015a4eadebe91cffe2a9e08011c134e5aa2 +F src/pager.c c9fdc3f4026f22e73d8fa586c4f58e14129036bb F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f F src/parse.y 4285cd2d0f31a8db4c4d54325f88e500452fa029 F src/pragma.c 4496cc77dc35824e1c978c3d1413b8a5a4c777d3 @@ -87,7 +87,7 @@ F src/update.c 14be4ba2f438919b4217085c02feff569e6cf1f2 F src/utf.c 1199766bbb0157931a83aa6eede6b6381177be64 F src/util.c 82ee598519b8193184bdeab06b51a4ffa05ad60b F src/vacuum.c 3865673cc66acd0717ecd517f6b8fdb2a5e7924b -F src/vdbe.c bda7131d98f2a742f864f9bbbb5249f3c0c6b432 +F src/vdbe.c 799e6280aef25bae55d2da21b5a6dbdda5e76e36 F src/vdbe.h 8729a4ee16ff9aeab2af9667df3cf300ff978e13 F src/vdbeInt.h eb3f86ab08ef11635bc78eb88c3ff13f923c233b F src/vdbeapi.c dcb2636f49b4807e34960d52a2fc257b3a751140 @@ -172,7 +172,7 @@ F test/insert2.test 5a20e1ace5fa0800b58d28284212290189b49aed F test/insert3.test 0096bd9766f94f4fa06ef712658e590b782cb44f F test/interrupt.test cd24dc5bedd02325be4bfa5d6209fae01c465157 F test/intpkey.test af4fd826c4784ec5c93b444de07adea0254d0d30 -F test/ioerr.test 35637957d7d5c6385bd94e8a6f067b5016219c03 +F test/ioerr.test 42581999ad54d5afe4d703550b1faf308e8cb53c F test/join.test db3802739fb695bdfa2e88805e3d64ec5ffbebd1 F test/join2.test f2171c265e57ee298a27e57e7051d22962f9f324 F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0 @@ -237,7 +237,7 @@ F test/table.test 6dc0dfa44dd429520e0e5a0c5e55025f730e9403 F test/tableapi.test 6a66d58b37d46dc0f2b3c7d4bd2617d209399bd1 F test/tclsqlite.test 96f5dbba15df0523e889b8d892f152c2f60b8efb F test/temptable.test c36f3e5a94507abb64f7ba23deeb4e1a8a8c3821 -F test/tester.tcl 0a939262ccb0b87449f98d8780396a4c293831b0 +F test/tester.tcl 66a4bfa61a05e08ea523ef077e7ad0eab090c327 F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35 F test/thread2.test 6d7b30102d600f51b4055ee3a5a19228799049fb F test/threadtest1.c 6029d9c5567db28e6dc908a0c63099c3ba6c383b @@ -344,7 +344,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 50964ef9b0159bfdcd7eae88b0806957cab184dc -R fc67d17ec10c28fa4fe646ce8c0e9586 +P d86f18a4277ebffb644ba2e574e0b697c8bbf8e4 +R 7dfccdc93457a7fd816b98a21dcb1bda U danielk1977 -Z 38f8621f1508c75b5e0809f898b0dbd0 +Z aa3b02a91bab4996b62f927ed568dabe diff --git a/manifest.uuid b/manifest.uuid index 4de6e12ec8..84e0ee2e5c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d86f18a4277ebffb644ba2e574e0b697c8bbf8e4 \ No newline at end of file +c30705a00d7d9d61fb9cb47a1019b1a186d690a7 \ No newline at end of file diff --git a/src/main.c b/src/main.c index b27d4f86dc..bbb2c05f4f 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.329 2006/01/19 17:42:51 drh Exp $ +** $Id: main.c,v 1.330 2006/01/24 13:09:33 danielk1977 Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -1088,23 +1088,21 @@ int sqlite3Corrupt(void){ */ int sqlite3_enable_shared_cache(int enable){ ThreadData *pTd = sqlite3ThreadData(); - if( !pTd ){ - return SQLITE_NOMEM; - } - - /* It is only legal to call sqlite3_enable_shared_cache() when there - ** are no currently open b-trees that were opened by the calling thread. - ** This condition is only easy to detect if the shared-cache were - ** previously enabled (and is being disabled). - */ - if( pTd->pBtree && !enable ){ - assert( pTd->useSharedData ); - return SQLITE_MISUSE; - } + if( pTd ){ + /* It is only legal to call sqlite3_enable_shared_cache() when there + ** are no currently open b-trees that were opened by the calling thread. + ** This condition is only easy to detect if the shared-cache were + ** previously enabled (and is being disabled). + */ + if( pTd->pBtree && !enable ){ + assert( pTd->useSharedData ); + return SQLITE_MISUSE; + } - pTd->useSharedData = enable; - sqlite3ReleaseThreadData(); - return SQLITE_OK; + pTd->useSharedData = enable; + sqlite3ReleaseThreadData(); + } + return sqlite3ApiExit(0, SQLITE_OK); } #endif diff --git a/src/pager.c b/src/pager.c index 9681ab5a1f..bd80b07c7a 100644 --- a/src/pager.c +++ b/src/pager.c @@ -18,7 +18,7 @@ ** file simultaneously, or one process from reading the database while ** another is writing. ** -** @(#) $Id: pager.c,v 1.255 2006/01/24 12:09:19 danielk1977 Exp $ +** @(#) $Id: pager.c,v 1.256 2006/01/24 13:09:33 danielk1977 Exp $ */ #ifndef SQLITE_OMIT_DISKIO #include "sqliteInt.h" @@ -1778,9 +1778,10 @@ void enable_simulated_io_errors(void){ void sqlite3pager_read_fileheader(Pager *pPager, int N, unsigned char *pDest){ memset(pDest, 0, N); if( MEMDB==0 ){ + disable_simulated_io_errors(); sqlite3OsSeek(pPager->fd, 0); sqlite3OsRead(pPager->fd, pDest, N); - clear_simulated_io_error(); + enable_simulated_io_errors(); } } diff --git a/src/vdbe.c b/src/vdbe.c index 8b08507364..090fff3814 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -43,7 +43,7 @@ ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** -** $Id: vdbe.c,v 1.538 2006/01/24 12:09:20 danielk1977 Exp $ +** $Id: vdbe.c,v 1.539 2006/01/24 13:09:33 danielk1977 Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -2971,7 +2971,7 @@ case OP_IsUnique: { /* no-push */ assert( pCx!=0 ); pCrsr = pCx->pCursor; if( pCrsr!=0 ){ - int res, rc; + int res; i64 v; /* The record number on the P1 entry that matches K */ char *zKey; /* The value of K */ int nKey; /* Number of bytes in K */ diff --git a/test/ioerr.test b/test/ioerr.test index e96dfd4a5b..47a1dadd6b 100644 --- a/test/ioerr.test +++ b/test/ioerr.test @@ -15,7 +15,7 @@ # The tests in this file use special facilities that are only # available in the SQLite test fixture. # -# $Id: ioerr.test,v 1.24 2006/01/23 16:25:22 drh Exp $ +# $Id: ioerr.test,v 1.25 2006/01/24 13:09:33 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -44,7 +44,7 @@ do_ioerr_test ioerr-1 -sqlprep { COMMIT; SELECT * FROM t1; DELETE FROM t1 WHERE a<100; -} -exclude [expr [string match [execsql {pragma auto_vacuum}] 1] ? 8 : 0] +} -exclude [expr [string match [execsql {pragma auto_vacuum}] 1] ? 4 : 0] # Test for IO errors during a VACUUM. # @@ -75,7 +75,7 @@ ifcapable vacuum { } -sqlbody { VACUUM; } -exclude [list \ - 1 [expr [string match [execsql {pragma auto_vacuum}] 1]?12:-1]] + 1 [expr [string match [execsql {pragma auto_vacuum}] 1]?9:-1]] } do_ioerr_test ioerr-3 -tclprep { @@ -120,7 +120,7 @@ do_ioerr_test ioerr-4 -tclprep { # reason as in test cases ioerr-1.XXX set ex "" if {[string match [execsql {pragma auto_vacuum}] 1]} { - set ex [list 8 17] + set ex [list 4 17] } do_ioerr_test ioerr-5 -sqlprep { ATTACH 'test2.db' AS test2; diff --git a/test/tester.tcl b/test/tester.tcl index 8e63d6bcd4..2a96704416 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.63 2006/01/21 12:08:55 danielk1977 Exp $ +# $Id: tester.tcl,v 1.64 2006/01/24 13:09:33 danielk1977 Exp $ # Make sure tclsqlite3 was compiled correctly. Abort now with an # error message if not. @@ -382,9 +382,10 @@ proc do_ioerr_test {testname args} { set r [catch $::ioerrorbody msg] set ::go [expr {$::sqlite_io_error_pending<=0}] set s [expr $::sqlite_io_error_hit==0] + set ::sqlite_io_error_hit 0 # puts "$::sqlite_io_error_pending $r $msg" - # puts "r=$r s=$s msg=\"$msg\"" - expr { ($s && !$r) || (!$s && $r) } + # puts "r=$r s=$s go=$::go msg=\"$msg\"" + expr { ($s && !$r && !$::go) || (!$s && $r && $::go) } # expr {$::sqlite_io_error_pending>0 || $r!=0} } {1}