-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Fix use of SQLite authorizers #585
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
After D. Richard Hipp has found where the issue lies, I better understand that the way GRDB often changes SQLite authorizers errs on the side of the misuse. A better fix would be to refactor GRDB around the use of a single authorizer per connection. |
… of a database connection SQLite invalidates statements when authorizer changes, which can lead to undesired behaviors. This is why we now call sqlite3_set_authorizer only once. See http://sqlite.1065341.n5.nabble.com/Issue-report-sqlite3-set-authorizer-triggers-error-4-516-SQLITE-ABORT-ROLLBACK-during-statement-itern-td107972.html
…(_:_:)` wrapper method.
Forced-pushed with a single authorizer per connection. |
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.
This pull request fixes an SQLite error 516 (SQLITE_ABORT_ROLLBACK) that can happen during the iteration of some database cursors, if other database statements are compiled during iteration steps. See #583 for a detailed description.
The issue does not affect all cursors, but only some of them. It actually looks like an issue in SQLite itself (see bug report).