aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-06-02 20:38:20 +0000
committerdrh <drh@noemail.net>2010-06-02 20:38:20 +0000
commit2d37e1cfb90fa6bbabdcd88bb86dbce86c30a13b (patch)
tree03026f845234f7f9951de926310bd8a77939552c /src
parent6e6bd5658f1fa8ab3780a309b42acab4de00e7d9 (diff)
downloadsqlite-2d37e1cfb90fa6bbabdcd88bb86dbce86c30a13b.tar.gz
sqlite-2d37e1cfb90fa6bbabdcd88bb86dbce86c30a13b.zip
When a lock fails due to an I/O error (not an SQLITE_BUSY) then the checkpoint
should fail. FossilOrigin-Name: c6eb0a27270df69018576232d8f97c16d63d8f6e
Diffstat (limited to 'src')
-rw-r--r--src/wal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wal.c b/src/wal.c
index bc2d6ff46..25175d966 100644
--- 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.
*/