Erlend E. Aasland <erlend.aasl...@innova.no> added the comment:

Yes, that seems to be the intention. But, I don't think there is a need to 
maintain the second list:

1. Resetting statements was historically needed both for commit and rollback; 
pending statements would block such operations. That's no longer the case for 
recent SQLite versions (commits fixed in SQLite 3.6.5, rollbacks in SQLite 
3.7.11). The sqlite3 module no longer reset commit statements 
(6ed442c48dd7f8d3097e688a36bc027df3271621), and there should be no need to 
reset rollbacks either (see bpo-44092).
2. A statement with ref count zero will be garbage collected. Thus, of a 
statement is dropped from the LRU cache, it will be sqlite3_finalize'd. No 
statement, no problem. It's the same effect as if 
_pysqlite_drop_unused_statement_references() used the same limit as the LRU 
cache.

If we want to explicit reset statements (for some reason), we'd be better off 
to use sqlite3_stmt_next(). It's faster, and it covers _all_ statements for a 
given connection.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44079>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to