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, erlendaasland, serhiy.storchaka
Date 2021-08-20.20:07:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:27erlendaaslandsetrecipients: + erlendaasland, berker.peksag, serhiy.storchaka
2021-08-20 20:07:27erlendaaslandsetmessageid: <>
2021-08-20 20:07:27erlendaaslandlinkissue44965 messages
2021-08-20 20:07:26erlendaaslandcreate