Author: Armin Rigo <[email protected]>
Branch: stdlib-2.7.13
Changeset: r89178:2aa05052bb18
Date: 2016-12-19 12:05 +0100
http://bitbucket.org/pypy/pypy/changeset/2aa05052bb18/
Log: A bit random, but it is enough to reset all "other" statements and
leave the statement we're currently trying to run un-reset here.
diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -363,8 +363,11 @@
if cursor is not None:
cursor._reset = True
- def _reset_all_statements(self):
- self.__do_all_statements(Statement._reset, False)
+ def _reset_other_statements(self, excepted):
+ for weakref in self.__statements:
+ statement = weakref()
+ if statement is not None and statement is not excepted:
+ statement._reset()
@_check_thread_wrap
@_check_closed_wrap
@@ -836,7 +839,7 @@
ret = _lib.sqlite3_step(self.__statement._statement)
if ret == _lib.SQLITE_LOCKED:
- self.__connection._reset_all_statements()
+ self.__connection._reset_other_statements(self.__statement)
ret = _lib.sqlite3_step(self.__statement._statement)
if ret == _lib.SQLITE_ROW:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit