gh-88239: Use sqlite3_stmt_busy() to determine if statements are in use#25984
gh-88239: Use sqlite3_stmt_busy() to determine if statements are in use#25984erlend-aasland merged 16 commits into
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(). |
Sorry, something went wrong.
I've left the exit paths as they are to avoid changing current behaviour. We can rework |
Sorry, something went wrong.
|
@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 |
Sorry, something went wrong.
|
Do we have tests covering this behaviour from before? |
Sorry, something went wrong.
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! |
Sorry, something went wrong.
|
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). |
Sorry, something went wrong.
Of course.
|
Sorry, something went wrong.
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|
#27844 was reverted, so I'm putting this on hold again. |
Sorry, something went wrong.
|
🤖 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. |
Sorry, something went wrong.
|
Buildbots are happy. I'll be merging this to |
Sorry, something went wrong.
Fixes #88239