1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

If walLockExclusive() fails for reasons other than SQLITE_BUSY inside of

walRestartLog() then propagate that error back up to the application.

FossilOrigin-Name: 04dcba6b3379d2168609950ed919c8f743705333
This commit is contained in:
drh
2010-10-05 15:41:05 +00:00
parent e062d7b847
commit 4533cd052d
3 changed files with 13 additions and 11 deletions

View File

@@ -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));