Bugs item #2432880, was opened at 2008-12-16 11:19
Message generated for change (Settings changed) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2432880&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: SQLObject release (specify)
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Iwan Vosloo (iwanvosloo)
>Assigned to: Oleg Broytmann (phd)
Summary: dropTable creates extra connection when used in transaction
Initial Comment:
This has been tested with sqlobject (versions 0.9.1 or 0.10.2) and postgresql.
If you start a transaction, and then call dropTable on a class, that call creates an extra postgresql connection, outside of the transaction.
This is caused by the following line in dbconnection.py:
755 attr = getattr(self._dbConnection, attr)
which is called while self is still the Transaction, for attr
'server_version'.
This, however, returns the server_version method on the connection, bound to the _dbconnection the getattr was called on. This bound method gets called, and inside it self.queryOne is called:
304 server_version = self.queryOne("SELECT version()")[0]
This call creates the second connection.
Attached is a file demonstrating the issue, and a temporary workaround.
----------------------------------------------------------------------
>Comment By: Oleg Broytmann (phd)
Date: 2009-04-17 20:46
Message:
Fixed in the revisions 3853-3855 (branches 0.9, 0.10 and the trunk). Thank
you!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2432880&group_id=74338
|