Charles <colei...@gmail.com> added the comment:
Sqlite since 3.7.11 provides sqlite3_stmt_readonly() API for determining if a prepared statement will affect the database. I made the change, removing the SQL scanning code and replacing it with: self->is_dml = !sqlite3_stmt_readonly(self->st); But then I see a number of test failures, mostly related to the fact that table-creation is now treated as "is_dml" with the above change. I don't know if the above API is going to be a workable path forward, since it seems like DML statements *not* automatically starting a transaction is a behavior a lot of people may have come to depend on (whether or not it is correct). I've attached a patch just-in-case anyone's interested. ---------- keywords: +patch Added file: https://bugs.python.org/file48319/36859.patch _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36859> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com