On Wed, Feb 01, 2006 at 12:06:43PM -0500, Justin Azoff wrote:
> Sounds familiar... I have to use the attached patch in order for
> transactions to work correctly. It was posted on the list but I'm not
> sure if it was ever applied.
> Without it, autocommit gets stuck turned off, and new transactions are
> started without being requested.
Applied, tested and committed at the revision 1578 to the trunk and 1579
to the 0.7-branch. Thank you!
> --- dbconnection.py 2005-09-29 02:22:20.000000000 -0400
> +++ /tmp/dbconnection.py 2006-02-01 12:02:54.839084219 -0500
> @@ -799,6 +799,8 @@
> def _makeObsolete(self):
> self._obsolete = True
> + if self._dbConnection.autoCommit:
> + self._dbConnection._setAutoCommit(self._connection, 1)
> self._connection = None
> @@ -809,6 +811,7 @@
> assert self._obsolete, "You cannot begin a new transaction session without rolling back this one"
> self._obsolete = False
> self._connection = self._dbConnection.getConnection()
> + self._dbConnection._setAutoCommit(self._connection, 0)
> def __del__(self):
> if self._obsolete:
Oleg Broytmann http://phd.pp.ru/ phd@...
Programmers don't die, they just GOSUB without RETURN.