[New-bugs-announce] [issue46249] [sqlite3] move set lastrowid out of the query loop

Erlend E. Aasland report at bugs.python.org
Mon Jan 3 16:14:27 EST 2022


New submission from Erlend E. Aasland <erlend.aasland at innova.no>:

The query loop in _pysqlite_query_execute() is run only once for ordinary execute()'s, but multiple times for executemany(). We use the 'multiple' variable to differ between the two execute methods; for execute(), multiple is false, for executemany(), multiple is true. At the end of the loop, the 'lastrowid' connection attribute is set, if multiple is false. We can safely move this part out of the loop; it is irrelevant for executemany(), and it will only be run once for execute().

----------
assignee: erlendaasland
components: Extension Modules
messages: 409620
nosy: erlendaasland
priority: normal
severity: normal
status: open
title: [sqlite3] move set lastrowid out of the query loop
type: enhancement
versions: Python 3.11

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


More information about the New-bugs-announce mailing list