]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove code accidently appended to pager.c.
authordrh <drh@noemail.net>
Sat, 3 Jul 2010 12:26:33 +0000 (12:26 +0000)
committerdrh <drh@noemail.net>
Sat, 3 Jul 2010 12:26:33 +0000 (12:26 +0000)
FossilOrigin-Name: 7cbe175a69738499f9218ec56f1a39f040aea9dc

manifest
manifest.uuid
src/pager.c

index 1f70600dc3d573f0b0fbc4a6bd4529ddb189d35f..88edf9d4af3e6d74f6432b4a9adba78a231b2d62 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Print\sthe\sSQLite\ssource_id()\sstring\swhen\srunning\sspeed\stests.
-D 2010-07-03T12:00:54
+C Remove\scode\saccidently\sappended\sto\spager.c.
+D 2010-07-03T12:26:33
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -159,7 +159,7 @@ F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f
 F src/os_os2.c 665876d5eec7585226b0a1cf5e18098de2b2da19
 F src/os_unix.c d7910391a4c9fa6898f7c9abbbb821d5d7edb78f
 F src/os_win.c dd4c6f238fe464e01dab5e4bc9158187ae305fe8
-F src/pager.c 99c214ea022f2b0c3f376f7233bbe27087c8cf62
+F src/pager.c eee7ac31ce893ed6b7e28f907fe99144c0696953
 F src/pager.h 879fdde5a102d2f21a3135d6f647530b21c2796c
 F src/parse.y ace5c7a125d9f2a410e431ee3209034105045f7e
 F src/pcache.c 1e9aa2dbc0845b52e1b51cc39753b6d1e041cb07
@@ -833,14 +833,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 62a10101776b41236ff7bd08c8aa85765a43df7c
-R 481c0db8ce6010db12d9fcb97b353bfe
+P 6d7640edcd69a932556f86500aedbf14e75ba7de
+R d0b007e2ef9688923f10274954448b62
 U drh
-Z 8fa4490ef13fe1a2c7643c3c7e1ea421
+Z be2fc7329c7e3b5fca1a0eb4a8d0cff8
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFMLyZ5oxKgR168RlERAk44AJwLnoZ8DBUmSTdqpRKV3JoCs1VlYgCfbIt4
-WpIhrDcSZ9lsy3gW6GAZnQk=
-=aScB
+iD8DBQFMLyx8oxKgR168RlERAkl1AJ4ohtqY31ahBbiC1mts0x8F0P605ACcC9FU
+hIo83ZyxiUs6yqlF5ffrsAg=
+=NNUf
 -----END PGP SIGNATURE-----
index 2dea3a4c2f2c441b22a8e216a3cef25bb7768379..359a11ad69b309afa6cdb4b41f0d16b96ba598ed 100644 (file)
@@ -1 +1 @@
-6d7640edcd69a932556f86500aedbf14e75ba7de
\ No newline at end of file
+7cbe175a69738499f9218ec56f1a39f040aea9dc
\ No newline at end of file
index 5ed4fe8ebfacb65a504fe05072b6c689a178518c..f0086e9c113ba7085e72b6a278df02dbaa8bb8ac 100644 (file)
@@ -2852,7 +2852,7 @@ int sqlite3PagerMaxPageCount(Pager *pPager, int mxPage){
   }
   if( pPager->state!=PAGER_UNLOCK ){
     sqlite3PagerPagecount(pPager, &nPage);
-    assert( pPager->mxPgno>=nPage );
+    assert( (int)pPager->mxPgno>=nPage );
   }
   return pPager->mxPgno;
 }
@@ -5649,7 +5649,7 @@ int sqlite3PagerNosync(Pager *pPager){
 /*
 ** Set or retrieve the codec for this pager
 */
-static void sqlite3PagerSetCodec(
+void sqlite3PagerSetCodec(
   Pager *pPager,
   void *(*xCodec)(void*,void*,Pgno,int),
   void (*xCodecSizeChng)(void*,int,int),
@@ -5663,7 +5663,7 @@ static void sqlite3PagerSetCodec(
   pPager->pCodec = pCodec;
   pagerReportSize(pPager);
 }
-static void *sqlite3PagerGetCodec(Pager *pPager){
+void *sqlite3PagerGetCodec(Pager *pPager){
   return pPager->pCodec;
 }
 #endif
@@ -6044,17 +6044,30 @@ int sqlite3PagerWalSupported(Pager *pPager){
 }
 
 /*
-** Open a connection to the write-ahead log file for pager pPager. If
-** the log connection is already open, this function is a no-op.
-**
 ** The caller must be holding a SHARED lock on the database file to call
 ** this function.
+**
+** If the pager passed as the first argument is open on a real database
+** file (not a temp file or an in-memory database), and the WAL file
+** is not already open, make an attempt to open it now. If successful,
+** return SQLITE_OK. If an error occurs or the VFS used by the pager does 
+** not support the xShmXXX() methods, return an error code. *pisOpen is
+** not modified in either case.
+**
+** If the pager is open on a temp-file (or in-memory database), or if
+** the WAL file is already open, set *pisOpen to 1 and return SQLITE_OK
+** without doing anything.
 */
-int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen){
+int sqlite3PagerOpenWal(
+  Pager *pPager,                  /* Pager object */
+  int *pisOpen                    /* OUT: Set to true if call is a no-op */
+){
   int rc = SQLITE_OK;             /* Return code */
 
   assert( pPager->state>=PAGER_SHARED );
-  if( !pPager->pWal ){
+  assert( (pisOpen==0 && !pPager->tempFile && !pPager->pWal) || *pisOpen==0 );
+
+  if( !pPager->tempFile && !pPager->pWal ){
     if( !sqlite3PagerWalSupported(pPager) ) return SQLITE_CANTOPEN;
 
     /* Open the connection to the log file. If this operation fails,