]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a problem causing the return code of an xSync call to be ignored in wal.c.
authordan <dan@noemail.net>
Mon, 9 Aug 2010 07:51:40 +0000 (07:51 +0000)
committerdan <dan@noemail.net>
Mon, 9 Aug 2010 07:51:40 +0000 (07:51 +0000)
FossilOrigin-Name: f1b2b5f9c3a5561ea6108283ae08404106c3f8bc

manifest
manifest.uuid
src/wal.c

index cf37d80174a4865e7f2967bb2c5f98a3bb356f25..9a4fbe11aa3c6f646f394ebafceb30f9d4e95636 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C In\sWAL\smode,\signore\sany\serror\sreturned\sby\san\sxFileControl(FCNTL_SIZE_HINT)\scall.\sThis\smatches\sthe\sbehaviour\sin\srollback\smode.
-D 2010-08-09T07:07:38
+C Fix\sa\sproblem\scausing\sthe\sreturn\scode\sof\san\sxSync\scall\sto\sbe\signored\sin\swal.c.
+D 2010-08-09T07:51:41
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -227,7 +227,7 @@ F src/vdbeblob.c 258a6010ba7a82b72b327fb24c55790655689256
 F src/vdbemem.c e5673f81a2381b35c60e73ef0a8502be2ab1041e
 F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2
 F src/vtab.c 82200af3881fa4e1c9cf07cf31d98c09d437e3ab
-F src/wal.c 4ac3c3d757447b54f6911d11843a5a40e2a14ab8
+F src/wal.c 582acbaa606c748675fafff516ec1b34a7bdae62
 F src/wal.h 96669b645e27cd5a111ba59f0cae7743a207bc3c
 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
 F src/where.c 7db3e41c2a846f9deeb24f1bbb75461b4010b7b5
@@ -843,7 +843,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 92e456374b052aceff356d10317b5b94fcdeaa5c
-R 8b8b84b2159488c8018e6a3bb6917d04
+P 158a309737bd4cdc033cd504a6d0cc43c15b6e17
+R 79082b63de1369184eea76cab5557bfc
 U dan
-Z c0e146dd93d7d775035eb9a6bc3d7235
+Z 5fdda4c9d9e63d074670dd4c1c360d96
index 93a3181d4d77cde3ab780c6fcc0ae7a332a7d1b3..45c173816514349dd2588ee1064906a4ad3afa77 100644 (file)
@@ -1 +1 @@
-158a309737bd4cdc033cd504a6d0cc43c15b6e17
\ No newline at end of file
+f1b2b5f9c3a5561ea6108283ae08404106c3f8bc
\ No newline at end of file
index 792a656623c37f0d6c8b80ddc07883c857f5d36b..5924a637562bb409fd0273819ae1fd30557b548d 100644 (file)
--- a/src/wal.c
+++ b/src/wal.c
@@ -1567,7 +1567,6 @@ static int walCheckpoint(
   if( pInfo->nBackfill<mxSafeFrame
    && (rc = walLockExclusive(pWal, WAL_READ_LOCK(0), 1))==SQLITE_OK
   ){
-    i64 nReq;                     /* File size hint passed to VFS */
     i64 nSize;                    /* Current size of database file */
     u32 nBackfill = pInfo->nBackfill;
 
@@ -1579,10 +1578,12 @@ static int walCheckpoint(
     /* If the database file may grow as a result of this checkpoint, hint
     ** about the eventual size of the db file to the VFS layer. 
     */
-    nReq = ((i64)mxPage * szPage);
-    rc = sqlite3OsFileSize(pWal->pDbFd, &nSize);
-    if( rc==SQLITE_OK && nSize<nReq ){
-      sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT, &nReq);
+    if( rc==SQLITE_OK ){
+      i64 nReq = ((i64)mxPage * szPage);
+      rc = sqlite3OsFileSize(pWal->pDbFd, &nSize);
+      if( rc==SQLITE_OK && nSize<nReq ){
+        sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT, &nReq);
+      }
     }
 
     /* Iterate through the contents of the WAL, copying data to the db file. */