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

Fix a problem with non-PASSIVE wal2 checkpoints sometimes taking the WRITER lock.

FossilOrigin-Name: 11d7865a56c1fbb978e3ba70ddc03c2a16080e2992c580e00e4c6c1fa47c043c
This commit is contained in:
dan
2024-12-14 16:50:29 +00:00
parent 52660d4d37
commit 3d6fbe469b
4 changed files with 37 additions and 9 deletions

View File

@@ -5158,7 +5158,7 @@ int sqlite3WalCheckpoint(
** writer lock retried until either the busy-handler returns 0 or the
** lock is successfully obtained.
*/
if( eMode!=SQLITE_CHECKPOINT_PASSIVE ){
if( eMode!=SQLITE_CHECKPOINT_PASSIVE && isWalMode2(pWal)==0 ){
rc = walBusyLock(pWal, xBusy2, pBusyArg, WAL_WRITE_LOCK, 1);
if( rc==SQLITE_OK ){
pWal->writeLock = 1;