This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erlendaasland
Recipients berker.peksag, erlendaasland, serhiy.storchaka
Date 2021-05-08.07:47:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620460079.81.0.577574944672.issue44073@roundup.psfhosted.org>
In-reply-to
Content
sqlite3_stmt_busy() has been around since SQLite 3.7.10. I suggest to drop the in_use field of pysqlite_Statement in favour of sqlite3_stmt_busy(); we do not need to duplicate functionality already present in SQLite.

There was a bugfix for sqlite3_stmt_busy() in SQLite 3.8.6 regarding rollback statements, but we normally reset all our statements after use, so it should not be a problem. There are some corner cases in _pysqlite_query_execute() where a sqlite3_stmt may not be reset upon return, but that's easily fixable (and it would be a nice side-effect).

Pro's:
- statement objects have one less member
- no duplication of SQLite functionality
- cleaner exit paths from _pysqlite_query_execute()
- less lines of code, easier to maintain

Con's:
- the current code works / "code churn"
History
Date User Action Args
2021-05-08 07:47:59erlendaaslandsetrecipients: + erlendaasland, berker.peksag, serhiy.storchaka
2021-05-08 07:47:59erlendaaslandsetmessageid: <1620460079.81.0.577574944672.issue44073@roundup.psfhosted.org>
2021-05-08 07:47:59erlendaaslandlinkissue44073 messages
2021-05-08 07:47:59erlendaaslandcreate