Message393241
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" |
|
Date |
User |
Action |
Args |
2021-05-08 07:47:59 | erlendaasland | set | recipients:
+ erlendaasland, berker.peksag, serhiy.storchaka |
2021-05-08 07:47:59 | erlendaasland | set | messageid: <1620460079.81.0.577574944672.issue44073@roundup.psfhosted.org> |
2021-05-08 07:47:59 | erlendaasland | link | issue44073 messages |
2021-05-08 07:47:59 | erlendaasland | create | |
|