]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a couple of missing calls to pagerLeave(). (CVS 4724)
authordanielk1977 <danielk1977@noemail.net>
Fri, 18 Jan 2008 11:33:16 +0000 (11:33 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Fri, 18 Jan 2008 11:33:16 +0000 (11:33 +0000)
FossilOrigin-Name: 87534dfff9e7a37c624a83c79f4074f29ff16c9e

manifest
manifest.uuid
src/pager.c

index 87df0e3962b8901046b289366fc51442f7be9db1..c57960cca08c2b07c3a77a73a88443b3c6128759 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sbug\sin\sthe\stest\sscripts\sthat\swas\spreventing\smany\sscripts\sfrom\nrunning\swith\sall.test.\s\sLots\sof\shidden\sfailures\snow\scome\sto\slight.\s(CVS\s4723)
-D 2008-01-18T02:31:56
+C Add\sa\scouple\sof\smissing\scalls\sto\spagerLeave().\s(CVS\s4724)
+D 2008-01-18T11:33:16
 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
 F Makefile.in 30789bf70614bad659351660d76b8e533f3340e9
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -124,7 +124,7 @@ F src/os_unix.c e4daef7628f690fa2b188af3632fb18f96525946
 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
 F src/os_win.c c832d528ea774c7094d887749d71884984c9034c
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
-F src/pager.c 0cb6ccea4b9615627d61d7c4417cedc45776d429
+F src/pager.c cf40ab8f57884ce1b5a355c0e42cdbaceaa42de0
 F src/pager.h f504f7ae84060fee0416a853e368d3d113c3d6fa
 F src/parse.y 2ae06e8d3190faace49c5b82e7cea1fc60d084a1
 F src/pragma.c 155315ee3e6a861a0060ba4d184dfffd08ebbc03
@@ -606,7 +606,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P a676f949b68c968d7e71aceb060c1639b42ba680
-R 93839145c08ea324c5b675c4f45479fc
-U drh
-Z 1ea0b43eccaa7ba550cce0e2e929012f
+P 251c78a982a33194a052897c37a2a79ae9654452
+R c0ed04846e95ed3c4b78c2b81c8b73fe
+U danielk1977
+Z a0c52f569e9f496fa4f45cbe77dad52f
index f7d0ab6549f06d359198d1f7da1cab8529cc9a1a..dd61cedae120ce00bac9fb6b3c9b3e7ea2c23cbb 100644 (file)
@@ -1 +1 @@
-251c78a982a33194a052897c37a2a79ae9654452
\ No newline at end of file
+87534dfff9e7a37c624a83c79f4074f29ff16c9e
\ No newline at end of file
index 80a1bdbe21345e32555fa6a8ff371135f871e5b9..c59fb7b9263f17e2aff12f2ff123b4be2059d590 100644 (file)
@@ -18,7 +18,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.400 2007/12/13 21:54:11 drh Exp $
+** @(#) $Id: pager.c,v 1.401 2008/01/18 11:33:16 danielk1977 Exp $
 */
 #ifndef SQLITE_OMIT_DISKIO
 #include "sqliteInt.h"
@@ -4385,8 +4385,11 @@ void sqlite3PagerDontRollback(DbPage *pPg){
 
   pagerEnter(pPager);
   assert( pPager->state>=PAGER_RESERVED );
-  if( pPager->journalOpen==0 ) return;
-  if( pPg->alwaysRollback || pPager->alwaysRollback || MEMDB ) return;
+  if( pPager->journalOpen==0 || pPg->alwaysRollback 
+   || pPager->alwaysRollback || MEMDB ){
+    pagerLeave(pPager);
+    return;
+  }
   if( !pPg->inJournal && (int)pPg->pgno <= pPager->origDbSize ){
     assert( pPager->aInJournal!=0 );
     pPager->aInJournal[pPg->pgno/8] |= 1<<(pPg->pgno&7);
@@ -4638,6 +4641,7 @@ int sqlite3PagerCommitPhaseTwo(Pager *pPager){
 #endif
     pPager->pStmt = 0;
     pPager->state = PAGER_SHARED;
+    pagerLeave(pPager);
     return SQLITE_OK;
   }
   assert( pPager->journalOpen || !pPager->dirtyCache );
@@ -4965,7 +4969,7 @@ void sqlite3PagerSetCodec(
 
 #ifndef SQLITE_OMIT_AUTOVACUUM
 /*
-** Move the page pPg to location pgno in the file. 
+** Move the page pPg to location pgno in the file.
 **
 ** There must be no references to the page previously located at
 ** pgno (which we call pPgOld) though that page is allowed to be
@@ -5055,7 +5059,10 @@ int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno){
     PgHdr *pPgHdr;
     assert( pPager->needSync );
     rc = sqlite3PagerGet(pPager, needSyncPgno, &pPgHdr);
-    if( rc!=SQLITE_OK ) return rc;
+    if( rc!=SQLITE_OK ){
+      pagerLeave(pPager);
+      return rc;
+    }
     pPager->needSync = 1;
     pPgHdr->needSync = 1;
     pPgHdr->inJournal = 1;