diff options
author | drh <drh@noemail.net> | 2010-10-05 15:41:05 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-10-05 15:41:05 +0000 |
commit | 4533cd052dfebbd9dd3caa7d1391866b94051a2a (patch) | |
tree | da6697d0602a7e1b96f9f08a80b89f9a3d298676 /src | |
parent | e062d7b8474d37779122798f075d9dc3601783ba (diff) | |
download | sqlite-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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)); |