[Python-Dev] sqlite, DDL, and transactions

Scott Urban scott.urban at isilon.com
Mon Dec 20 17:48:25 CET 2010


Hi

The python sqlite module automatically commits open transactions
when it encounters a DDL statement.  This is unnecessary; DDL is
transaction in my testing (see attached).

Attached patch addresses the issue. Patch is against 2.6.1, but
looking at Trunk in svn, it seems like the patch is needed and
would apply. One issue I could foresee is that this behavior might
depend on the sqlite version in use (I'm on 3.6.10).

Thanks
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pysql-transactions.2.diff
Type: text/x-diff
Size: 2545 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101220/3c640c23/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_sqlite_ddl.py
Type: text/x-python
Size: 3433 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101220/3c640c23/attachment.py>


More information about the Python-Dev mailing list