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;