Message399931
Ref. Serhiy's msg387858 in bpo-43350:
"Maybe the code could be rewritten in more explicit way and call pysqlite_statement_reset() only when it is necessary [...]"
Currently, we try to reset statements in all "statement exit" routes. IMO, it would be cleaner to just reset statements when we really need to:
1. before the first sqlite3_step()
2. at cursor exit, if there's an active statement
(3. in pysqlite_do_all_statements() ... see bpo-44092)
This will make the code easier to follow, and it will minimise the number of resets. The current patch is pretty small: 7 insertions(+), 33 deletions(-)
Pro:
- less lines of code, less maintenance
- cleaner exit paths
- optimise SQLite API usage
Con:
- code churn
If this is accepted, PR 25984 of bpo-44073 will be easier to land and review :) |
|
Date |
User |
Action |
Args |
2021-08-20 07:33:50 | erlendaasland | unlink | issue44958 messages |
2021-08-19 20:05:09 | erlendaasland | set | recipients:
+ erlendaasland, berker.peksag, serhiy.storchaka, pablogsal |
2021-08-19 20:05:09 | erlendaasland | set | messageid: <1629403509.48.0.897657910933.issue44958@roundup.psfhosted.org> |
2021-08-19 20:05:09 | erlendaasland | link | issue44958 messages |
2021-08-19 20:05:08 | erlendaasland | create | |
|