rowcount fix.

This commit is contained in:
Federico Di Gregorio 2004-12-20 02:32:08 +00:00
parent f6aaacd79b
commit 280562890b
3 changed files with 8 additions and 7 deletions

View File

@ -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.

View File

@ -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

View File

@ -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;