[pypy-commit] pypy default: a more proper fix than the one applied in c1c610355c04
bdkearns
noreply at buildbot.pypy.org
Thu Apr 4 10:01:37 CEST 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r63001:ace23a4657c0
Date: 2013-04-04 04:01 -0400
http://bitbucket.org/pypy/pypy/changeset/ace23a4657c0/
Log: a more proper fix than the one applied in c1c610355c04
diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -892,11 +892,6 @@
raise ValueError("operation parameter must be str or unicode")
self.__description = None
self.__rowcount = -1
-
- if sql == 'BEGIN':
- self.__connection._begin()
- return
-
self.__statement = self.__connection._statement_cache.get(
sql, self.row_factory)
@@ -918,8 +913,6 @@
ret = _lib.sqlite3_step(self.__statement._statement)
if ret not in (_lib.SQLITE_DONE, _lib.SQLITE_ROW):
self.__statement._reset()
- self.__connection._in_transaction = \
- not _lib.sqlite3_get_autocommit(self.__connection._db)
raise self.__connection._get_exception(ret)
if self.__statement._kind == Statement._DML:
@@ -934,6 +927,8 @@
self.__rowcount = 0
self.__rowcount += _lib.sqlite3_changes(self.__connection._db)
finally:
+ self.__connection._in_transaction = \
+ not _lib.sqlite3_get_autocommit(self.__connection._db)
self.__locked = False
return self
More information about the pypy-commit
mailing list