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:
@@ -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) );
|
||||
|
Reference in New Issue
Block a user