-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove depth from Savepoint #1327
Merged
Merged
Conversation
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
Savepoints with the same name nest properly without issue. This doesn't work with rusqlite unless savepoints are always released on drop.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1327 +/- ##
==========================================
+ Coverage 80.48% 80.75% +0.26%
==========================================
Files 49 49
Lines 9950 10094 +144
==========================================
+ Hits 8008 8151 +143
- Misses 1942 1943 +1
☔ View full report in Codecov by Sentry. |
gwenn
reviewed
May 31, 2023
After a top-level savepoint exits on non-Ignore, the savepoint should not be left on the stack.
I guess that: Line 347 in 841014b
is buggy. In case of error on RELEASE, we ROLLBACK the savepoint. But we should ROLLBACK AND RELEASE, no? sqlite> PRAGMA foreign_keys = true;
sqlite> CREATE TABLE r(n INTEGER PRIMARY KEY NOT NULL);
sqlite> CREATE TABLE f(n REFERENCES r(n) DEFERRABLE INITIALLY DEFERRED);
sqlite> SAVEPOINT s;
sqlite> INSERT INTO f VALUES (0);
sqlite> RELEASE s;
Runtime error: FOREIGN KEY constraint failed (19)
sqlite> ROLLBACK TO s;
sqlite> COMMIT; -- does not fail because s is still on the stack...
sqlite> |
gwenn
added a commit
to gwenn/rusqlite
that referenced
this pull request
Jun 12, 2023
Merged
Ah, yes, you're right. I had overlooked that. |
bors
added a commit
to rust-lang/cargo
that referenced
this pull request
Dec 1, 2023
chore(deps): update rust crate rusqlite to 0.30.0 [![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [rusqlite](https://togithub.com/rusqlite/rusqlite) | workspace.dependencies | minor | `0.29.0` -> `0.30.0` | --- ### Release Notes <details> <summary>rusqlite/rusqlite (rusqlite)</summary> ### [`v0.30.0`](https://togithub.com/rusqlite/rusqlite/releases/tag/v0.30.0): 0.30.0 [Compare Source](https://togithub.com/rusqlite/rusqlite/compare/v0.29.0...v0.30.0) #### What's Changed - Fix sqlite3\_auto_extension xEntryPoint signature [#​1310](https://togithub.com/rusqlite/rusqlite/issues/1310) - Use track_caller for panicking methods [#​1314](https://togithub.com/rusqlite/rusqlite/issues/1314) - Force linking against system sqlite libs [#​1317](https://togithub.com/rusqlite/rusqlite/issues/1317) - fix compilation for target wasm32-wasi [#​1321](https://togithub.com/rusqlite/rusqlite/issues/1321) - Add SQLITE_MAX_COLUMN compile-time option [#​1324](https://togithub.com/rusqlite/rusqlite/issues/1324) - Upgrade http links to https in Cargo.toml [#​1330](https://togithub.com/rusqlite/rusqlite/issues/1330) - Update fallible-iterator requirement from 0.2 to 0.3 [#​1334](https://togithub.com/rusqlite/rusqlite/issues/1334) - Implement FromSql & ToSql for std::num::NonZero types [#​1313](https://togithub.com/rusqlite/rusqlite/issues/1313) - Add new constants introduced by SQLite 3.42.0 [#​1336](https://togithub.com/rusqlite/rusqlite/issues/1336) - Use SQLITE_PREPARE_PERSISTENT for CachedStatement [#​1339](https://togithub.com/rusqlite/rusqlite/issues/1339) - Fix type of SQLITE_DESERIALIZE\_*, SQLITE_PREPARE\_*, SQLITE_SERIALIZE_\* [#​1340](https://togithub.com/rusqlite/rusqlite/issues/1340) - Introduce to_sqlite_error [#​1345](https://togithub.com/rusqlite/rusqlite/issues/1345) - remove depth from Savepoint [#​1327](https://togithub.com/rusqlite/rusqlite/issues/1327) - Savepoint Drop bug [#​1347](https://togithub.com/rusqlite/rusqlite/issues/1347) - \[breaking change] Update edition from 2018 to 2021 [#​1267](https://togithub.com/rusqlite/rusqlite/issues/1267) - Remove msrv for clippy by [#​1351](https://togithub.com/rusqlite/rusqlite/issues/1351) - Tweak bindgen [#​1352](https://togithub.com/rusqlite/rusqlite/issues/1352), [#​1353](https://togithub.com/rusqlite/rusqlite/issues/1353) - Inline constraint_error_code [#​1359](https://togithub.com/rusqlite/rusqlite/issues/1359) - Simplify bindgen generation [#​1360](https://togithub.com/rusqlite/rusqlite/issues/1360) - Fixes generate_series to handle NULL arguments [#​1357](https://togithub.com/rusqlite/rusqlite/issues/1357) - Factorize code in build.rs [#​1361](https://togithub.com/rusqlite/rusqlite/issues/1361) - Serialize and deserialize database [#​1341](https://togithub.com/rusqlite/rusqlite/issues/1341) - Spelling and a few more nits [#​1373](https://togithub.com/rusqlite/rusqlite/issues/1373) - Implement support for more `time` types [#​1374](https://togithub.com/rusqlite/rusqlite/issues/1374) - Fix visibility of TransactionState [#​1384](https://togithub.com/rusqlite/rusqlite/issues/1384) - Column is used only with column_decltype feature [#​1385](https://togithub.com/rusqlite/rusqlite/issues/1385) - Use proper var names in trait definition [#​1398](https://togithub.com/rusqlite/rusqlite/issues/1398) - Fix clippy warning: arc_with_non_send_sync - interrupt_lock [#​1400](https://togithub.com/rusqlite/rusqlite/issues/1400) - Captured identifiers in SQL strings [#​1346](https://togithub.com/rusqlite/rusqlite/issues/1346) - Add new constants introduced by SQLite 3.43.0 [#​1405](https://togithub.com/rusqlite/rusqlite/issues/1405) - Make WindowAggregate::value pass mutable value ref [#​1395](https://togithub.com/rusqlite/rusqlite/issues/1395) - Bump bundled SQLite version to 3.44.0 [#​1409](https://togithub.com/rusqlite/rusqlite/issues/1409) - Bump bindgen version to 0.69 [#​1410](https://togithub.com/rusqlite/rusqlite/issues/1410) - Loadable extension [#​1362](https://togithub.com/rusqlite/rusqlite/issues/1362) #### New Contributors - [`@​icp1994](https://togithub.com/icp1994)` made their first contribution in [rusqlite/rusqlite#1317 - [`@​wasm-forge](https://togithub.com/wasm-forge)` made their first contribution in [rusqlite/rusqlite#1321 - [`@​nopjia](https://togithub.com/nopjia)` made their first contribution in [rusqlite/rusqlite#1324 - [`@​Benjins-automation](https://togithub.com/Benjins-automation)` made their first contribution in [rusqlite/rusqlite#1330 - [`@​itsxaos](https://togithub.com/itsxaos)` made their first contribution in [rusqlite/rusqlite#1313 - [`@​Taywee](https://togithub.com/Taywee)` made their first contribution in [rusqlite/rusqlite#1327 - [`@​davidselassie](https://togithub.com/davidselassie)` made their first contribution in [rusqlite/rusqlite#1357 - [`@​nyurik](https://togithub.com/nyurik)` made their first contribution in [rusqlite/rusqlite#1373 - [`@​nydrani](https://togithub.com/nydrani)` made their first contribution in [rusqlite/rusqlite#1374 **Full Changelog**: rusqlite/rusqlite@v0.29.0...v0.30.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/rust-lang/cargo). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Savepoints with the same name nest properly without issue. This doesn't work with rusqlite unless savepoints are always released on drop.
closes #1326