aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-10-05 15:41:05 +0000
committerdrh <drh@noemail.net>2010-10-05 15:41:05 +0000
commit4533cd052dfebbd9dd3caa7d1391866b94051a2a (patch)
treeda6697d0602a7e1b96f9f08a80b89f9a3d298676 /src
parente062d7b8474d37779122798f075d9dc3601783ba (diff)
downloadsqlite-4533cd052dfebbd9dd3caa7d1391866b94051a2a.tar.gz
sqlite-4533cd052dfebbd9dd3caa7d1391866b94051a2a.zip
If walLockExclusive() fails for reasons other than SQLITE_BUSY inside of
walRestartLog() then propagate that error back up to the application. FossilOrigin-Name: 04dcba6b3379d2168609950ed919c8f743705333
Diffstat (limited to 'src')
-rw-r--r--src/wal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wal.c b/src/wal.c
index 18f2a89eb..f90faa238 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -2366,7 +2366,7 @@ int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){
**
** SQLITE_OK is returned if no error is encountered (regardless of whether
** or not pWal->hdr.mxFrame is modified). An SQLite error code is returned
-** if some error
+** if an error occurs.
*/
static int walRestartLog(Wal *pWal){
int rc = SQLITE_OK;
@@ -2399,6 +2399,8 @@ static int walRestartLog(Wal *pWal){
for(i=1; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
assert( pInfo->aReadMark[0]==0 );
walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
+ }else if( rc!=SQLITE_BUSY ){
+ return rc;
}
}
walUnlockShared(pWal, WAL_READ_LOCK(0));