[issue44958] [sqlite3] only reset statements when needed

Erlend E. Aasland report at bugs.python.org
Fri Aug 20 14:05:33 EDT 2021


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

I did a quick count of sqlite3_reset()s in the sqlite3 test suite:
- main:     2976 calls
- PR 27844: 1730 calls

Since we never call sqlite3_reset() with a NULL pointer, all sqlite3_reset() calls we execute hold the SQLite db mutex; reducing the number of sqlite3_reset() calls reduces the number of times we need to hold the mutex.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44958>
_______________________________________


More information about the Python-bugs-list mailing list