#12 sqlite-finalize doesn't finish cached statements

Closed
opened 3 years ago by reepca · 1 comments
reepca commented 3 years ago

"An implicit transaction (a transaction that is started automatically, not a transaction started by BEGIN) is committed automatically when the last active statement finishes. A statement finishes when its last cursor closes, which is guaranteed to happen when the prepared statement is reset or finalized. Some statements might "finish" for the purpose of transaction control prior to being reset or finalized, but there is no guarantee of this. The only way to ensure that a statement has "finished" is to invoke sqlite3_reset() or sqlite3_finalize() on that statement."

~ https://www.sqlite.org/lang_transaction.html

Thus, cached statements should be reset when sqlite-finalize is invoked on them, to preserved the statement-finishing behavior of sqlite_finalize that could be expected.

"An implicit transaction (a transaction that is started automatically, not a transaction started by BEGIN) is committed automatically when the last active statement finishes. A statement finishes when its last cursor closes, which is guaranteed to happen when the prepared statement is reset or finalized. Some statements might "finish" for the purpose of transaction control prior to being reset or finalized, but there is no guarantee of this. The only way to ensure that a statement has "finished" is to invoke sqlite3_reset() or sqlite3_finalize() on that statement." ~ https://www.sqlite.org/lang_transaction.html Thus, cached statements should be reset when `sqlite-finalize` is invoked on them, to preserved the statement-finishing behavior of `sqlite_finalize` that could be expected.
reepca commented 3 years ago
Poster
Fixed by https://notabug.org/guile-sqlite3/guile-sqlite3/pulls/13
Sign in to join this conversation.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.