-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
gh-88239: Use sqlite3_stmt_busy() to determine if statements are in use #25984
Conversation
No user-visible change, so I'm adding the skip news label. Marking as draft until I've verified all the exit paths in _pysqlite_query_execute(). |
cc. @corona10 |
I've left the exit paths as they are to avoid changing current behaviour. We can rework |
@pablogsal, are you comfortable with reviewing this, wrt. SQLite API? The change is very straight-forwared, so it should be easy to review. Here's a link to the relevant API: https://sqlite.org/c3ref/stmt_busy.html |
Do we have tests covering this behaviour from before? |
The if statement in query execute lacks test coverage. I've got one lying around from the sqlite3 coverage issue. I'll add it to the PR once I'm back at my computer. Thanks! |
I would like to ame sure that we have coverage for this to ensure that we don't introduce regressions (although we shouldn't if I read this PR correctly). |
Of course.
|
This reverts commit 5b1fca2.
Instead of resetting a statment on every "exit" path, only reset when needed: 1. reset before first sqlite3_step() 2. on cursor close, reset the statement attached to it
sqlite3
statement handling; only reset statements when needed
sqlite3
statement handling; only reset statements when needed
#27844 was reverted, so I'm putting this on hold again. |
🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit 37bf9ef 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Buildbots are happy. I'll be merging this to |
Fixes #88239