Author: turnstep
Date: Mon May 9 08:36:24 2011
New Revision: 14841
Modified:
DBD-Pg/trunk/Changes
DBD-Pg/trunk/dbdimp.c
Log:
Fix for bug 68041: properly clear out result queue after pg_putcopyend and
pg_getcopydata finish.
Modified: DBD-Pg/trunk/Changes
==============================================================================
--- DBD-Pg/trunk/Changes (original)
+++ DBD-Pg/trunk/Changes Mon May 9 08:36:24 2011
@@ -5,6 +5,9 @@
- Fix LANG testing issue [GSM] (CPAN bug #56705)
+ - Fix bug when async commands issued immediately after a COPY. [GSM] (CPAN
bug #68041)
+
+
Version 2.18.0 Released March 28, 2011 (subversion r14081)
- Thanks to 123people.com for sponsoring work on this release [GSM]
Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c (original)
+++ DBD-Pg/trunk/dbdimp.c Mon May 9 08:36:24 2011
@@ -3849,6 +3849,9 @@
TRACE_PQGETRESULT;
result = PQgetResult(imp_dbh->conn);
status = _sqlstate(aTHX_ imp_dbh, result);
+ while (result != NULL) {
+ result = PQgetResult(imp_dbh->conn);
+ }
TRACE_PQCLEAR;
PQclear(result);
if (PGRES_COMMAND_OK != status) {
@@ -3941,6 +3944,9 @@
TRACE_PQGETRESULT;
result = PQgetResult(imp_dbh->conn);
status = _sqlstate(aTHX_ imp_dbh, result);
+ while (result != NULL) {
+ result = PQgetResult(imp_dbh->conn);
+ }
TRACE_PQCLEAR;
PQclear(result);
if (PGRES_COMMAND_OK != status) {