System.Data.SQLite
Ticket Change Details
Not logged in
Overview

Artifact ID: 8e85121821926ebd59fde505e5e7d0be136854ce
Ticket: 0b91277bb4e13c7c68bdbbb76558871ed5dd5c35
Add option for a process exclusive mode to open files on Windows
User & Date: anonymous 2020-01-24 02:27:10
Changes

  1. Change foundin to "All to date"
  2. Change icomment to:

    When making calls to the Win32 CreateFile() function, SQLite appears to always set the file sharing parameter dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE which allows the file to be opened for shared access across processes. CreateFile() must be called with a dwShareMode = 0 in order to open the file in a true process exclusive access mode. See https://docs.microsoft.com/en-us/windows/win32/fileio/creating-and-opening-files for full details.

    A side effect of this behavior is even when SQLite is configured for EXCLUSIVE WAL mode, users are still able to copy open SQLite database files on Windows using Explorer or other means which can result in corrupt copies that befuddle end users.

    To avoid this for our use cases, we're currently having to rebuild our own custom version of SQLite which allows us to force dwShareMode = 0. We're reaching out and see if there would be any appetite to add an option to allow for a process exclusive file access mode in the upstream SQLite?

  3. Change login to "anonymous"
  4. Change mimetype to "text/plain"
  5. Change private_contact to "a214446b313c03bc7875380263b179ad1b3e7c88"
  6. Change severity to "Important"
  7. Change status to "Open"
  8. Change title to:

    Add option for a process exclusive mode to open files on Windows

  9. Change type to "Feature_Request"