[DBD::Pg] AutoInactiveDestroy fix per RT #95505

[email protected] Tue, 20 May 2014 13:36:34 +0000
Newsgroups perl.dbd.pg.changes
Message-ID <[email protected]>
Committed by David Dick <[email protected]>

AutoInactiveDestroy fix per RT #95505

---
 dbdimp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dbdimp.c b/dbdimp.c
index 476eae7..16b74e7 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -3851,7 +3851,7 @@ void dbd_st_destroy (SV * sth, imp_sth_t * imp_sth)
 		croak("dbd_st_destroy called twice!");
 
 	/* If the AutoInactiveDestroy flag has been set, we go no further */
-	if (DBIc_AIADESTROY(imp_dbh)) {
+	if ((DBIc_AIADESTROY(imp_dbh)) && ((U32)PerlProc_getpid() != imp_dbh->pid_number)) {
 		if (TRACE4_slow) {
 			TRC(DBILOGFP, "%sskipping sth destroy due to AutoInactiveDestroy\n", THEADER_slow);
 		}
-- 
1.8.4