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, corona10, erlendaasland, serhiy.storchaka
Date 2021-02-25.11:12:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614251574.26.0.503614507282.issue43290@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2021-02-25 11:12:54erlendaaslandsetrecipients: + erlendaasland, berker.peksag, serhiy.storchaka, corona10
2021-02-25 11:12:54erlendaaslandsetmessageid: <1614251574.26.0.503614507282.issue43290@roundup.psfhosted.org>
2021-02-25 11:12:54erlendaaslandlinkissue43290 messages
2021-02-25 11:12:54erlendaaslandcreate