Db transactions and locking

Chris Angelico rosuav at gmail.com
Fri Nov 28 07:58:50 CET 2014

On Fri, Nov 28, 2014 at 5:57 PM, Frank Millman <frank at chagford.com> wrote:
> cur.execute('commit') tells the database to commit the transaction, but the
> adaptor is not aware of this, so does not reset. Therefore the next command
> does not trigger starting a new transaction.
> I have now learned another lesson - never use cur.execute('commit'), always
> use conn.commit()

Without looking in the source I can't be sure, but that seems very logical.


More information about the Python-list mailing list