diff options
author | dan <Dan Kennedy> | 2023-11-28 15:29:04 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2023-11-28 15:29:04 +0000 |
commit | b8950e0f45656a96c09d5721e564fa0b8ef8e79a (patch) | |
tree | fbda303e2fe58e60c0af9a5ad8a35ee5dda7bd9a /src/wal.c | |
parent | bae2d0f2ebfa7385890adae075e998e86252b59e (diff) | |
download | sqlite-b8950e0f45656a96c09d5721e564fa0b8ef8e79a.tar.gz sqlite-b8950e0f45656a96c09d5721e564fa0b8ef8e79a.zip |
Handle an SQLITE_BUSY_TIMEOUT error if one occurs while attempting a shared lock on a read-lock slot.
FossilOrigin-Name: 5fbf3906d272df3eb981f67455eb35f649ad2774cba9fc3f077b28d9bef3f0cb
Diffstat (limited to 'src/wal.c')
-rw-r--r-- | src/wal.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3134,7 +3134,8 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){ rc = walLockShared(pWal, WAL_READ_LOCK(mxI)); walDisableBlocking(pWal); if( rc ){ - return rc==SQLITE_BUSY ? WAL_RETRY : rc; + assert( (rc&0xFF)!=SQLITE_BUSY||rc==SQLITE_BUSY||rc==SQLITE_BUSY_TIMEOUT ); + return (rc&0xFF)==SQLITE_BUSY ? WAL_RETRY : rc; } /* Now that the read-lock has been obtained, check that neither the ** value in the aReadMark[] array or the contents of the wal-index |