]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
When a lock fails due to an I/O error (not an SQLITE_BUSY) then the checkpoint
authordrh <drh@noemail.net>
Wed, 2 Jun 2010 20:38:20 +0000 (20:38 +0000)
committerdrh <drh@noemail.net>
Wed, 2 Jun 2010 20:38:20 +0000 (20:38 +0000)
should fail.

FossilOrigin-Name: c6eb0a27270df69018576232d8f97c16d63d8f6e

manifest
manifest.uuid
src/wal.c

index 755d8d1743db8dcf8b585e0bdfafd98b94bf2339..c25461abaa1457a49caa79b4c45cd692edf3e01d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,8 @@
-C Fix\sa\sproblem\swith\srolling\sback\sto\sa\ssavepoint\sopened\sbefore\sthe\swriter\sdecided\sto\swrap\sthe\slog\sfile.
-D 2010-06-02T18:59:03
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+C When\sa\slock\sfails\sdue\sto\san\sI/O\serror\s(not\san\sSQLITE_BUSY)\sthen\sthe\scheckpoint\nshould\sfail.
+D 2010-06-02T20:38:20
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -224,7 +227,7 @@ F src/vdbeblob.c 5327132a42a91e8b7acfb60b9d2c3b1c5c863e0e
 F src/vdbemem.c 2a82f455f6ca6f78b59fb312f96054c04ae0ead1
 F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2
 F src/vtab.c a0f8a40274e4261696ef57aa806de2776ab72cda
-F src/wal.c 82da8997bccdf229edc192aede6e00a3454321e4
+F src/wal.c be73c9a8a3027a7bba1229dc09890927b992da45
 F src/wal.h 4ace25262452d17e7d3ec970c89ee17794004008
 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
 F src/where.c 75fee9e255b62f773fcadd1d1f25b6f63ac7a356
@@ -815,7 +818,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P cb571c1b71a37b3a10d640987c77a6eec508235d
-R 958f6d0fb0d51651adb74690506f1284
-U dan
-Z 8958cafc220d9bcfdae765c6216ea4c7
+P 6b4aed6aae7dc9e92807d27375cbe1e83c15841b
+R 5a63358b24f762d2a5d723d2f4dee266
+U drh
+Z 5916110e5843d94fcf92f8c8799678c0
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFMBsE/oxKgR168RlERAnyXAJ9L8EZUrUM001IAwVmNi3rJmErAKACfZ+qz
+cfaXGrDf9yLgardB9fTDyec=
+=U93m
+-----END PGP SIGNATURE-----
index ce9427a6333a53c9d6b837f338e9cbdb38e3ff29..ce583037f6fd0d9cff99599fb0767537b1b0f91d 100644 (file)
@@ -1 +1 @@
-6b4aed6aae7dc9e92807d27375cbe1e83c15841b
\ No newline at end of file
+c6eb0a27270df69018576232d8f97c16d63d8f6e
\ No newline at end of file
index bc2d6ff46eebbeea938fb5106c20d4262418daee..25175d966a9334b182e878375cdca928c45e449d 100644 (file)
--- a/src/wal.c
+++ b/src/wal.c
@@ -1438,8 +1438,11 @@ static int walCheckpoint(
       ){
         pInfo->aReadMark[i] = 0;
         walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1);
-      }else{
+      }else if( rc==SQLITE_BUSY ){
         mxSafeFrame = y-1;
+      }else{
+        walIteratorFree(pIter);
+        return rc;
       }
     }
   }
@@ -1478,7 +1481,7 @@ static int walCheckpoint(
 
     /* Release the reader lock held while backfilling */
     walUnlockExclusive(pWal, WAL_READ_LOCK(0), 1);
-  }else{
+  }else if( rc==SQLITE_BUSY ){
     /* Reset the return code so as not to report a checkpoint failure
     ** just because active readers prevent any backfill.
     */