From 18ef0ec67ded5013593ce4e021d9a76428100acb Mon Sep 17 00:00:00 2001 From: adustman Date: Sat, 29 Dec 2001 02:28:18 +0000 Subject: [PATCH] Fix fetchmany(). --- MySQLdb/MySQLdb/cursors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MySQLdb/MySQLdb/cursors.py b/MySQLdb/MySQLdb/cursors.py index 7bd1d55..4cdabf9 100644 --- a/MySQLdb/MySQLdb/cursors.py +++ b/MySQLdb/MySQLdb/cursors.py @@ -231,7 +231,7 @@ class CursorStoreResultMixIn: """Fetch up to size rows from the cursor. Result set may be smaller than size. If size is not defined, cursor.arraysize is used.""" self._check_executed() - end = self.rownumber + size or self.arraysize + end = self.rownumber + (size or self.arraysize) result = self._rows[self.rownumber:end] self.rownumber = min(end, len(self._rows)) return result