diff options
author | dan <Dan Kennedy> | 2025-01-30 15:26:16 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2025-01-30 15:26:16 +0000 |
commit | 462888819e3582e30c8a513285bd4d524a64f66e (patch) | |
tree | 314ae3c121748130954cfa1221f150d02c58c2cc /src/os_unix.c | |
parent | 43aad25b1b535f1c8c44ae964bf53e40eb351378 (diff) | |
download | sqlite-462888819e3582e30c8a513285bd4d524a64f66e.tar.gz sqlite-462888819e3582e30c8a513285bd4d524a64f66e.zip |
Have sqlite3_enable_setlk(-1) configure indefinite blocking locks where they are supported.
FossilOrigin-Name: 62009565d2f2a2c4d347e1da0d5b4ad43056742df47fd6ddb92e62f53a2b57f1
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index b1996278c..58e495210 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4038,8 +4038,9 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){ #ifdef SQLITE_ENABLE_SETLK_TIMEOUT case SQLITE_FCNTL_LOCK_TIMEOUT: { int iOld = pFile->iBusyTimeout; + int iNew = *(int*)pArg; #if SQLITE_ENABLE_SETLK_TIMEOUT==1 - pFile->iBusyTimeout = *(int*)pArg; + pFile->iBusyTimeout = iNew<0 ? 0x7FFFFFFF : (unsigned)iNew; #elif SQLITE_ENABLE_SETLK_TIMEOUT==2 pFile->iBusyTimeout = !!(*(int*)pArg); #else |