- changed status to resolved
fetchmany() fails on bufferedcolproxy on second call w/ no rows
Issue #3329
resolved
diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py
index 730ef44..a5318c0 100644
--- a/test/engine/test_execute.py
+++ b/test/engine/test_execute.py
@@ -1070,6 +1070,9 @@ class AlternateResultProxyTest(fixtures.TestBase):
rows = r.fetchmany(6)
eq_(rows, [(i, "t_%d" % i) for i in range(1, 6)])
+ rows = r.fetchmany(2)
+ eq_(rows, [])
+
def test_plain(self):
self._test_proxy(_result.ResultProxy)
Comments (2)
-
reporter -
reporter - changed milestone to 1.0
- edited description
no easy way to fix this in 0.9 without changing a lot
- Log in to comment
.ResultProxy
is now a "soft" close. That is, after exhausing all rows using the fetch methods, the DBAPI cursor is released as before and the object may be safely discarded, but the fetch methods may continue to be called for which they will return an end-of-result object (None for fetchone, empty list for fetchmany and fetchall). Only if :meth:.ResultProxy.close
is called explicitly will these methods raise the "result is closed" error. fixes#3330fixes#3329→ <<cset b7e151ac5cf5>>