[svn:dbd-oracle] r15358 - dbd-oracle/trunk
[email protected] Mon, 6 Aug 2012 07:18:10 -0700 (PDT)
| Newsgroups | perl.dbd.oracle.changes |
|---|---|
| Message-ID | <[email protected]> |
Author: mjevans
Date: Mon Aug 6 07:18:09 2012
New Revision: 15358
Modified:
dbd-oracle/trunk/Changes
dbd-oracle/trunk/dbdimp.c
Log:
Fix RT 46739 - do not reuse an env handle after connection is broken
Modified: dbd-oracle/trunk/Changes
==============================================================================
--- dbd-oracle/trunk/Changes (original)
+++ dbd-oracle/trunk/Changes Mon Aug 6 07:18:09 2012
@@ -15,6 +15,9 @@
- fix issue with taf_function being set to a scalar which goes
out of scope before the callback is made (Martin J. Evans)
+ - fix RT46739 if a connection breaks the environment handle is
+ not thrown away (Martin J. Evans)
+
[MISCELLANEOUS]
- hide dr, db and st packages from PAUSE
Modified: dbd-oracle/trunk/dbdimp.c
==============================================================================
--- dbd-oracle/trunk/dbdimp.c (original)
+++ dbd-oracle/trunk/dbdimp.c Mon Aug 6 07:18:09 2012
@@ -594,6 +594,17 @@
forced_new_environment = 1;
}
}
+ /* RT46739 */
+ if (imp_dbh->envhp) {
+ OCIError *errhp;
+ OCIHandleAlloc_ok(imp_dbh, imp_dbh->envhp, &errhp, OCI_HTYPE_ERROR, status);
+ if (status != OCI_SUCCESS) {
+ imp_dbh->envhp = NULL;
+ } else {
+ OCIHandleFree_log_stat(imp_dbh, errhp, OCI_HTYPE_ERROR, status);
+ }
+ }
+
if (!imp_dbh->envhp ) {
SV **init_mode_sv;
ub4 init_mode = OCI_OBJECT; /* needed for LOBs (8.0.4) */