[issue28518] execute("begin immediate") throwing OperationalError

Aviv Palivoda report at bugs.python.org
Thu Dec 29 09:49:22 EST 2016


Aviv Palivoda added the comment:

Issue #29003 seems to be related to this one. I think that they can be solved the same way as done in Serhiy patch but I would like to suggest a different approach.
I suggest changing the check for DDL statement with a check for DML statement. We actually should start a transaction only for DML statements (https://docs.python.org/3/library/sqlite3.html#controlling-transactions) so all other statements (DDL, DCL and TCL) should not start a transaction.
The attached patch solve both this issue and issue #29003.

----------
Added file: http://bugs.python.org/file46079/sqlite-ddl-dml.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28518>
_______________________________________


More information about the Python-bugs-list mailing list