Author: Armin Rigo <[email protected]>
Branch:
Changeset: r76707:7c75c5d7b8db
Date: 2015-04-04 11:11 +0200
http://bitbucket.org/pypy/pypy/changeset/7c75c5d7b8db/
Log: Fix for test_sqlite3
diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -1246,7 +1246,6 @@
ret = _lib.sqlite3_prepare_v2(self.__con._db, c_sql, -1,
statement_star, next_char)
self._statement = statement_star[0]
- self.__con._remember_statement(self)
if ret == _lib.SQLITE_OK and not self._statement:
# an empty statement, work around that, as it's the least trouble
@@ -1259,6 +1258,8 @@
if ret != _lib.SQLITE_OK:
raise self.__con._get_exception(ret)
+ self.__con._remember_statement(self)
+
tail = _ffi.string(next_char[0]).decode('utf-8')
if _check_remaining_sql(tail):
raise Warning("You can only execute one statement at a time.")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit