summaryrefslogtreecommitdiff
path: root/psycopg/pqpath.c
diff options
context:
space:
mode:
authorFederico Di Gregorio <fog@initd.org>2004-12-20 02:32:08 +0000
committerFederico Di Gregorio <fog@initd.org>2004-12-20 02:32:08 +0000
commit280562890b0bc424148a0247a49c3f666417233b (patch)
treedb1cbf16b740ca95058a4a9b8912f674fb99adaf /psycopg/pqpath.c
parentf6aaacd79b11d21d584774a8048441b69cdba6b6 (diff)
downloadpsycopg2-280562890b0bc424148a0247a49c3f666417233b.tar.gz
rowcount fix.
Diffstat (limited to 'psycopg/pqpath.c')
-rw-r--r--psycopg/pqpath.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c
index ea34400..30e13f3 100644
--- a/psycopg/pqpath.c
+++ b/psycopg/pqpath.c
@@ -353,8 +353,6 @@ pq_is_busy(connectionObject *conn)
int
pq_execute(cursorObject *curs, const char *query, int async)
{
- int err;
-
/* if the status of the connection is critical raise an exception and
definitely close the connection */
if (curs->conn->critical) {
@@ -410,10 +408,7 @@ pq_execute(cursorObject *curs, const char *query, int async)
to respect the old DBAPI-2.0 compatible behaviour */
if (async == 0) {
Dprintf("pq_execute: entering syncronous DBAPI compatibility mode");
- do {
- err = pq_fetch(curs);
- if (err == -1) return -1;
- } while (err == 1);
+ if (pq_fetch(curs) == -1) return -1;
}
else {
curs->conn->async_cursor = (PyObject*)curs;