Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81670

Re: Db transactions and locking

References <m56u4s$baa$1@ger.gmane.org> <4loe7at2ls7tfq0oe041ru9svvsm8aksik@4ax.com> <m5924d$nbq$1@ger.gmane.org> <m596c2$jpd$1@ger.gmane.org>
Date 2014-11-28 17:58 +1100
Subject Re: Db transactions and locking
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.16397.1417157933.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Nov 28, 2014 at 5:57 PM, Frank Millman <frank@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.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Db transactions and locking Chris Angelico <rosuav@gmail.com> - 2014-11-28 17:58 +1100

csiph-web