diff options
author | dan <Dan Kennedy> | 2025-05-30 20:52:18 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2025-05-30 20:52:18 +0000 |
commit | ded1959120db41174d720fc3a157cc648694d6f9 (patch) | |
tree | 3a8857aadfdf292dc0c55d4e25acdfa35ac92ae2 /src/os_unix.c | |
parent | 88ed38ca6d4502959093a0e05d55a718369a0d9f (diff) | |
download | sqlite-ded1959120db41174d720fc3a157cc648694d6f9.tar.gz sqlite-ded1959120db41174d720fc3a157cc648694d6f9.zip |
If blocking locks are enabled, avoid using the busy handler when blocked by another process running recovery.
FossilOrigin-Name: a35236757ab57c4c9b34e47c5dbc10d8f1220f8152955f5303cf9c3902ee169b
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 1146545fe..5bbd7ceb6 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -5043,13 +5043,14 @@ static int unixShmLock( ** occur later in the above list than the lock being obtained may be ** held. ** - ** It is not permitted to block on the RECOVER lock. + ** It is not permitted to block on the RECOVER lock if any other + ** locks are held. */ #if defined(SQLITE_ENABLE_SETLK_TIMEOUT) && defined(SQLITE_DEBUG) { u16 lockMask = (p->exclMask|p->sharedMask); assert( (flags & SQLITE_SHM_UNLOCK) || pDbFd->iBusyTimeout==0 || ( - (ofst!=2) /* not RECOVER */ + (ofst!=2 || lockMask==0) /* not RECOVER */ && (ofst!=1 || lockMask==0 || lockMask==2) && (ofst!=0 || lockMask<3) && (ofst<3 || lockMask<(1<<ofst)) |