-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes sqlite3_config and sqlite3_initialize from local db new
This change removes ffi::sqlite3_config() and ffi::sqlite3_initialize() from local/database.new and moves the configuration down to local/connection#connect. This is done because a SQLite connection can not be initialized multiple times, this change frees users of the library to intialize SQLite connections at a different level. initialize specifically presents a problem when libsql is being included in a shared library where there are other shared libraries that interact with the SQLite C API. This change *should* be relatively safe, since connections can change the threading mode on a per connection basis so long that sqlite was compiled with SQLITE_THREADSAFE=1 or SQLITE_THREADSAFE=2. Refs: * https://sqlite.org/threadsafe.html * https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigserialized.
- Loading branch information
1 parent
58b016a
commit 32296ab
Showing
2 changed files
with
25 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters