[Twisted-Python] adapi.Connection._runQuery always does rollback()
Andrew Bennetts
andrew-twisted at puzzling.org
Sat Apr 26 08:07:22 MDT 2003
On Sat, Apr 26, 2003 at 09:55:46AM -0400, Eric C. Newton wrote:
> RedHat 9.0 on intel
> Twisted 1.0.4
>
> In twisted.enterprise.adbapi we find this method of ConnectionPool:
[snip -- runQuery always does a rollback]
The theory here, I believe is that queries are meant to have no side-effects
on the DB, so the rollback is done to guarantee this. If you *do* want to
change the state of the DB, use runOperation.
> PS. This buglet brought to you by MySQL which does not support rollback(),
> and tells you with an exception.
Then the database module you are using doesn't adhere to DB-API 2.0[1], which
adbapi requires.
-Andrew.
[1] http://www.python.org/topics/database/DatabaseAPI-2.0.html
More information about the Twisted-Python
mailing list