Message399992
Currently, if a non-DML statement is executed with executemany(), we only bail as late as possible: just before the call to _pysqlite_fetch_one_row(). This means that we've already stepped through the statement once (!), and possibly bound values, built the row cast map, and created the description tuple, all before raising the "executemany() can only execute DML statements."
So, the error message currently is not quite true, because we already executed the statement once.
Checking for this earlier will prevent a (possibly time-consuming) sqlite3_step(), and it will leave the main loop in _pysqlite_query_execute() slightly easier to read, IMO. |
|
Date |
User |
Action |
Args |
2021-08-20 20:07:27 | erlendaasland | set | recipients:
+ erlendaasland, berker.peksag, serhiy.storchaka |
2021-08-20 20:07:27 | erlendaasland | set | messageid: <1629490047.04.0.534577541585.issue44965@roundup.psfhosted.org> |
2021-08-20 20:07:27 | erlendaasland | link | issue44965 messages |
2021-08-20 20:07:26 | erlendaasland | create | |
|