[svn:DBD-Pg] r14538 - DBD-Pg/trunk

[email protected]
Newsgroups gmane.comp.db.postgresql.dbdpg.cvs
Message-ID <[email protected]>
Author: turnstep
Date: Sat Nov 20 21:03:00 2010
New Revision: 14538

Modified:
   DBD-Pg/trunk/Changes
   DBD-Pg/trunk/dbdimp.c

Log:
Don't PQclear on execute() if there is an active async query
[rweikusat at mssgmbh.com] (CPAN bug #58376)


Modified: DBD-Pg/trunk/Changes
==============================================================================
--- DBD-Pg/trunk/Changes	(original)
+++ DBD-Pg/trunk/Changes	Sat Nov 20 21:03:00 2010
@@ -6,6 +6,8 @@
     [Dagfinn Ilmari Mannsåker] (CPAN bug #60200).
   - Fix failing test in t/04misc.t on Perl 5.12. [Eric Simon]
   - Allow data_sources() to accept any case-variant of 'dbi:Pg' (CPAN bug #61574)
+  - Don't PQclear on execute() if there is an active async query
+    [rweikusat at mssgmbh.com] (CPAN bug #58376)
 
 2.17.1 Released April 8, 2010
 

Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c	(original)
+++ DBD-Pg/trunk/dbdimp.c	Sat Nov 20 21:03:00 2010
@@ -2910,8 +2910,13 @@
 		}
 	}
 
-	/* clear old result (if any) */
-	if (imp_sth->result) {
+	/*
+	  Clear old result (if any), except if starting the
+	  query asynchronously. Old async results will be
+	  deleted implicitly the next time pg_db_result is
+	  called.
+	*/
+	if (imp_sth->result && !(imp_sth->async_flag & PG_ASYNC)) {
 		TRACE_PQCLEAR;
 		PQclear(imp_sth->result);
 		imp_sth->result = NULL;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.