summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--MANIFEST.in2
-rw-r--r--psycopg/pqpath.c7
3 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 38fdefa..6cb537a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-20 Federico Di Gregorio <fog@debian.org>
+
+ * psycopg/pqpath.c (pq_execute): removed multiple calls to
+ pq_fetch in syncronous DBAPI compatibility mode to solve rowcount
+ problem.
+
2004-12-14 Federico Di Gregorio <fog@debian.org>
* Mm.. release 1.99.11.
diff --git a/MANIFEST.in b/MANIFEST.in
index 62bc8e9..f24d138 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -2,7 +2,7 @@ recursive-include psycopg *.c *.h
recursive-include lib *.py
recursive-include ZPsycopgDA *.py *.gif *.dtml
recursive-include examples *.py somehackers.jpg whereareyou.jpg
-#recursive-include test *.py
+#recursive-include tests *.py
recursive-include doc TODO HACKING SUCCESS ChangeLog-1.x
include scripts/maketypes.sh scripts/buildtypes.py
include AUTHORS README INSTALL ChangeLog setup.py setup.cfg
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;