mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix a locking race condition in Windows 10 that can occur when two or more
processes attempt to recover the same hot journal at the same time. FossilOrigin-Name: 38a4e9d92887898b779493c71e4500f777a4e2e7
This commit is contained in:
@@ -3169,9 +3169,8 @@ static int winLock(sqlite3_file *id, int locktype){
|
||||
** the PENDING_LOCK byte is temporary.
|
||||
*/
|
||||
newLocktype = pFile->locktype;
|
||||
if( (pFile->locktype==NO_LOCK)
|
||||
|| ( (locktype==EXCLUSIVE_LOCK)
|
||||
&& (pFile->locktype==RESERVED_LOCK))
|
||||
if( pFile->locktype==NO_LOCK
|
||||
|| (locktype==EXCLUSIVE_LOCK && pFile->locktype<=RESERVED_LOCK)
|
||||
){
|
||||
int cnt = 3;
|
||||
while( cnt-->0 && (res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS,
|
||||
|
||||
Reference in New Issue
Block a user