diff --git a/manifest b/manifest index afb2381fc9..add6fd9bce 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sto\ssqlite3AllocMalloc()\swhen\sit\sis\sa\sno-op\smacro.\s(CVS\s2998) -D 2006-01-23T13:28:54 +C Do\snot\sautomatically\srollback\sat\sthe\sbtree\sor\spager\slevel\sif\sa\scommit\sfails.\s(CVS\s2999) +D 2006-01-23T13:47:47 F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -34,7 +34,7 @@ F src/alter.c 90b779cf00489535cab6490df6dc050f40e4e874 F src/analyze.c 7d2b7ab9a9c2fd6e55700f69064dfdd3e36d7a8a F src/attach.c 0081040e9a5d13669b6712e947688c10f030bfc1 F src/auth.c 9ae84d2d94eb96195e04515715e08e85963e96c2 -F src/btree.c ab0f6813b32e0db14883a71bd228470989dea609 +F src/btree.c e3cb390f7da8ebe9d81ffb59df2a9f9b65f9d344 F src/btree.h 5663c4f43e8521546ccebc8fc95acb013b8f3184 F src/build.c 15224e2fd348ad32b9044aaa5bdc912e4067da15 F src/callback.c 1bf497306c32229114f826707054df7ebe10abf2 @@ -59,7 +59,7 @@ F src/os_unix.c 38a55e51fb2c6f32c0ce86d274f5787f6c3668ed F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e F src/os_win.c 98e4e38db7d4a00647b2bb1c60d28b7ca5034c03 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b -F src/pager.c 184a3045ff5243458f2fff41f0b8d2524da39660 +F src/pager.c 9c0ac7536168f92eef1c4033ef97414d838cd504 F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f F src/parse.y 4285cd2d0f31a8db4c4d54325f88e500452fa029 F src/pragma.c 4496cc77dc35824e1c978c3d1413b8a5a4c777d3 @@ -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 1f42a338e2ee90f4c24a9eb19054c4b831dd661f -R db1024d73945d88640ca69945bf51c00 -U drh -Z 098c9854808402d15135d501adfed3ef +P 8caa9f95b8a36e34510cf46d518bd63bd8fa0a32 +R ee42ba01834fee9f6799c64d4ff28b9b +U danielk1977 +Z ad5bd029c9c2de6cb67cc213e02c05d2 diff --git a/manifest.uuid b/manifest.uuid index b679a77320..d3193fceae 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8caa9f95b8a36e34510cf46d518bd63bd8fa0a32 \ No newline at end of file +0f6329ef1fe0d5b225b6381fda1e8d800f65ea0f \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 89c3f9750f..2ca3058040 100644 --- a/src/btree.c +++ b/src/btree.c @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.308 2006/01/23 13:00:36 drh Exp $ +** $Id: btree.c,v 1.309 2006/01/23 13:47:47 danielk1977 Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** For a detailed discussion of BTrees, refer to @@ -2450,22 +2450,25 @@ autovacuum_out: ** are no active cursors, it also releases the read lock. */ int sqlite3BtreeCommit(Btree *p){ - int rc = SQLITE_OK; BtShared *pBt = p->pBt; btreeIntegrity(p); - unlockAllTables(p); /* If the handle has a write-transaction open, commit the shared-btrees ** transaction and set the shared state to TRANS_READ. */ if( p->inTrans==TRANS_WRITE ){ + int rc; assert( pBt->inTransaction==TRANS_WRITE ); assert( pBt->nTransaction>0 ); rc = sqlite3pager_commit(pBt->pPager); + if( rc!=SQLITE_OK ){ + return rc; + } pBt->inTransaction = TRANS_READ; pBt->inStmt = 0; } + unlockAllTables(p); /* If the handle has any kind of transaction open, decrement the transaction ** count of the shared btree. If the transaction count reaches 0, set @@ -2486,7 +2489,7 @@ int sqlite3BtreeCommit(Btree *p){ unlockBtreeIfUnused(pBt); btreeIntegrity(p); - return rc; + return SQLITE_OK; } #ifndef NDEBUG diff --git a/src/pager.c b/src/pager.c index 08e9b4a31a..291b1ab092 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.250 2006/01/23 13:09:46 danielk1977 Exp $ +** @(#) $Id: pager.c,v 1.251 2006/01/23 13:47:47 danielk1977 Exp $ */ #ifndef SQLITE_OMIT_DISKIO #include "sqliteInt.h" @@ -3249,16 +3249,8 @@ int sqlite3pager_commit(Pager *pPager){ int rc; PgHdr *pPg; - if( pPager->errCode==SQLITE_FULL ){ - rc = sqlite3pager_rollback(pPager); - if( rc==SQLITE_OK ){ - rc = SQLITE_FULL; - } - return rc; - } if( pPager->errCode ){ - rc = pPager->errCode; - return rc; + return pPager->errCode; } if( pPager->statejournalOpen ); rc = sqlite3pager_sync(pPager, 0, 0); - if( rc!=SQLITE_OK ){ - goto commit_abort; + if( rc==SQLITE_OK ){ + rc = pager_unwritelock(pPager); + pPager->dbSize = -1; } - rc = pager_unwritelock(pPager); - pPager->dbSize = -1; - return rc; - - /* Jump here if anything goes wrong during the commit process. - */ -commit_abort: - sqlite3pager_rollback(pPager); return rc; }