mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
When an attempt to change journal_mode fails due to locks, be sure to
leave internal structures in a consistent state. FossilOrigin-Name: cf3d1e0b8a739302cf2848ac3e6eaaae04e6a44c
This commit is contained in:
@@ -5959,6 +5959,10 @@ int sqlite3PagerCloseWal(Pager *pPager){
|
||||
pPager->pageSize, (u8*)pPager->pTmpSpace
|
||||
);
|
||||
pPager->pWal = 0;
|
||||
}else{
|
||||
/* If we cannot get an EXCLUSIVE lock, downgrade the PENDING lock
|
||||
** that we did get back to SHARED. */
|
||||
sqlite3OsUnlock(pPager->fd, SQLITE_LOCK_SHARED);
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user