Skip to content

Commit

Permalink
Microsoft.Data.Sqlite: Use multi-thread mode
Browse files Browse the repository at this point in the history
Previously, the default mode (usually Serialized) was used. Since ADO.NET connections are generally not thread safe, this caused unnecessary lock checking in SQLite.

Note, this will break compatibility with versions compiled with SQLITE_THREADSAFE=0. However, we plan to add a connection pool in this release which, I suspect, will also break compatibility with those versions anyway.

Resolves #22330
  • Loading branch information
bricelam committed Dec 8, 2020
1 parent 82847c7 commit 011414c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.Data.Sqlite.Core/SqliteConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public override void Open()
}

var filename = ConnectionOptions.DataSource;
var flags = 0;
var flags = SQLITE_OPEN_NOMUTEX;

if (filename.StartsWith("file:", StringComparison.OrdinalIgnoreCase))
{
Expand Down

0 comments on commit 011414c

Please sign in to comment.