/ Check-in [3340f086]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:When an error occurs while transitioning out of WAL mode, make sure the locking state is not left at EXCLUSIVE.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3340f086510b08ce5b42a8781f1df51bf7c27701
User & Date: drh 2016-04-20 19:30:47
Context
2016-04-21
02:27
Add the SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION method for enabling sqlite3_load_extension() while leaving the load_extension() SQL function disabled. check-in: c4f165c4 user: drh tags: trunk
2016-04-20
19:30
When an error occurs while transitioning out of WAL mode, make sure the locking state is not left at EXCLUSIVE. check-in: 3340f086 user: drh tags: trunk
18:31
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. check-in: 38a4e9d9 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/pager.c.

  7307   7307     if( rc==SQLITE_OK && pPager->pWal ){
  7308   7308       rc = pagerExclusiveLock(pPager);
  7309   7309       if( rc==SQLITE_OK ){
  7310   7310         rc = sqlite3WalClose(pPager->pWal, pPager->ckptSyncFlags,
  7311   7311                              pPager->pageSize, (u8*)pPager->pTmpSpace);
  7312   7312         pPager->pWal = 0;
  7313   7313         pagerFixMaplimit(pPager);
         7314  +      if( rc && !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
  7314   7315       }
  7315   7316     }
  7316   7317     return rc;
  7317   7318   }
  7318   7319   
  7319   7320   #ifdef SQLITE_ENABLE_SNAPSHOT
  7320   7321   /*