1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Allow sqlite3WalCheckpoint() to be called even if the WAL is in the

SQLITE_SHM_READ state, as sometimes happens after an error.

FossilOrigin-Name: 175b296f9b9680f605537f52a8a53944deaa5391
This commit is contained in:
drh
2010-05-13 15:44:00 +00:00
parent 0bfad1171f
commit 5cccc940cc
3 changed files with 20 additions and 10 deletions

View File

@@ -1467,8 +1467,8 @@ int sqlite3WalCheckpoint(
** be set to UNLOCK when this function returns. This is Ok.
*/
assert( (pWal->lockState==SQLITE_SHM_UNLOCK)
|| (pWal->exclusiveMode && pWal->lockState==SQLITE_SHM_READ)
);
|| (pWal->lockState==SQLITE_SHM_READ) );
walSetLock(pWal, SQLITE_SHM_UNLOCK);
do {
rc = walSetLock(pWal, SQLITE_SHM_CHECKPOINT);
}while( rc==SQLITE_BUSY && xBusyHandler(pBusyHandlerArg) );