2.1.0 / 2024-09-24
2.1.0 / 2024-09-24
Ruby
- This release drops support for Ruby 3.0. [#563] @flavorjones
Fork safety improvements
Sqlite itself is not fork-safe. Specifically, writing in a child process to a database connection that was created in the parent process may corrupt the database file. To mitigate this risk, sqlite3-ruby has implemented the following changes:
- All open writable database connections carried across a
fork()
will immediately be closed in the child process to mitigate the risk of corrupting the database file. - These connections will be incompletely closed ("discarded") which will result in a one-time memory leak in the child process.
If it's at all possible, we strongly recommend that you close writable database connections in the parent before forking. If absolutely necessary (and you know what you're doing), you may suppress the fork safety warnings by calling SQLite3::ForkSafety.suppress_warnings!
.
See the README's "Fork Safety" section and adr/2024-09-fork-safety.md
for more information. [#558, #565, #566] @flavorjones
Improved
- Use
sqlite3_close_v2
to close databases in a deferred manner if there are unclosed prepared statements. Previously closing a database while statements were open resulted in aBusyException
. See https://www.sqlite.org/c3ref/close.html for more context. [#557] @flavorjones - When setting a Database
busy_handler
, fire the write barrier to prevent potential crashes during the GC mark phase. [#556] @jhawthorn
Documentation
New Contributors
- @jhawthorn made their first contribution in #556
- @rickhull made their first contribution in #562
Full Changelog: v2.0.4...v2.1.0
sha256 checksums:
6ed8c7edce2c4ec432152f548ffc80667bd774870d585bf5634d8e2e085fb70d sqlite3-2.1.0-aarch64-linux-gnu.gem
b8330e67696ae9294b6e5da0d7ceb4e33e46462e1911b79fdf81eb20aa6f0dc7 sqlite3-2.1.0-aarch64-linux-musl.gem
577636e21e7373546f2f2e526316a53ed0ee0eeaa10960647e26479d1ebb49b9 sqlite3-2.1.0-arm64-darwin.gem
7bad1c60fd4e46c4c941bfc4d12c59254a9715b289655a606880e471e829c74c sqlite3-2.1.0-arm-linux-gnu.gem
42ec543f593e0b3ddb5a944e15ede59dea3cc35acb27639e67bc6f819b1b5bcc sqlite3-2.1.0-arm-linux-musl.gem
aea47c58078c274ca83195ce1686ee22c4641eb60ccab12918500e78c4babb4f sqlite3-2.1.0.gem
0c7505899d8754c4cd73b02f0aec88028a0f282cdb426f3b2e5fa2c9dafd0dce sqlite3-2.1.0-x64-mingw-ucrt.gem
e2be8fad85b6aee16f83baad378b3b3ab992c904e98592cccfd845ad56f4da1f sqlite3-2.1.0-x86_64-darwin.gem
8993191e8304386d6a9bd76fe9ed161f323ddf857cc06f7f77a31e8b6ccb4d34 sqlite3-2.1.0-x86_64-linux-gnu.gem
cd6b7e6701b1110f033d3dbd156ac19bca011ed4e976c7897b402d578720b9c3 sqlite3-2.1.0-x86_64-linux-musl.gem
1a092fbe4b6cbf20bbeec239c95b8b9caa0d9faa0ad2431fa46ababcd3d91718 sqlite3-2.1.0-x86-linux-gnu.gem
ea377977a07031a6215a2d5ed1e0bd7fb77da0cbbca1af145533b10e0e11bc02 sqlite3-2.1.0-x86-linux-musl.gem