Erlend Egeberg Aasland <[email protected]> added the comment:
> I wonder if it is possible at all to reach this branch. If it is not, then
> I'm pretty sure Cursor.in_use is redundant
Typo: should be Statement.in_use
Corner error cases may cause the _pysqlite_query_execute() loop to exit without
pysqlite_statement_reset() being called, thus leaving Statement.in_use == 1,
but when _pysqlite_query_execute() is called again and if there's an active
statement, pysqlite_statement_reset() will reset in_use to zero, before we ever
reach the if (self->statement->in_use) { ... } statement.
I can open a separate issue for considering removing Statement.in_use.
> (I assume only valid Statement objects are added to the cache.)
AFAICS, this is true.
We can wait for Berker and/or Serhiy to confirm/correct my assumptions and
findings.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43290>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com