php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52958
Patch 52958-PHP-5.4-20120623.patch revision 2012-06-23 09:26 UTC by hswong3i at gmail dot com
Patch 52958-fix-pdo-oci-cleanups.patch revision 2010-10-06 19:34 UTC by kontakt at beberlei dot de
revision 2010-10-06 19:22 UTC by kontakt at beberlei dot de

Patch 52958-fix-pdo-oci-cleanups.patch for PDO related Bug #52958

Patch version 2010-10-06 19:34 UTC

Return to Bug #52958 | Download this patch
This patch is obsolete

Obsoleted by patches:

This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: kontakt@beberlei.de

Only in php-5.3.3/ext/pdo_oci/: .libs
diff -u php-5.3.3-orig/php-5.3.3/ext/pdo_oci/oci_driver.c php-5.3.3/ext/pdo_oci/oci_driver.c
--- php-5.3.3-orig/php-5.3.3/ext/pdo_oci/oci_driver.c	2010-01-12 13:46:54.000000000 +0100
+++ php-5.3.3/ext/pdo_oci/oci_driver.c	2010-10-06 20:41:02.000000000 +0200
@@ -187,18 +187,14 @@
 	if (H->svc) {
 		/* rollback any outstanding work */
 		OCITransRollback(H->svc, H->err, 0);
+                OCISessionEnd(H->svc, H->err, H->session, (ub4) 0);
 	}
 
 	if (H->session) {
-		OCIHandleFree(H->session, OCI_HTYPE_SESSION);
+		OCIHandleFree((dvoid *)H->session, OCI_HTYPE_SESSION);
 		H->session = NULL;
 	}
 
-	if (H->svc) {
-		OCIHandleFree(H->svc, OCI_HTYPE_SVCCTX);
-		H->svc = NULL;
-	}
-
 	if (H->server && H->attached) {
 		H->last_err = OCIServerDetach(H->server, H->err, OCI_DEFAULT);
 		if (H->last_err) {
@@ -207,16 +203,23 @@
 		H->attached = 0;
 	}
 
+	if (H->svc) {
+		OCIHandleFree((dvoid *)H->svc, (ub4) OCI_HTYPE_SVCCTX);
+		H->svc = NULL;
+	}
+
 	if (H->server) {
-		OCIHandleFree(H->server, OCI_HTYPE_SERVER);
+		OCIHandleFree((dvoid *)H->server, (ub4) OCI_HTYPE_SERVER);
 		H->server = NULL;
 	}
 
-	OCIHandleFree(H->err, OCI_HTYPE_ERROR);
-	H->err = NULL;
+    if (H->err) {
+        OCIHandleFree((dvoid *)H->err, OCI_HTYPE_ERROR);
+        H->err = NULL;
+    }
 
 	if (H->charset && H->env) {
-		OCIHandleFree(H->env, OCI_HTYPE_ENV);
+		OCIHandleFree((dvoid *)H->env, OCI_HTYPE_ENV);
 		H->env = NULL;
 	}
 
Only in php-5.3.3/ext/pdo_oci/: oci_driver.lo
diff -u php-5.3.3-orig/php-5.3.3/ext/pdo_oci/oci_statement.c php-5.3.3/ext/pdo_oci/oci_statement.c
--- php-5.3.3-orig/php-5.3.3/ext/pdo_oci/oci_statement.c	2010-01-03 10:23:27.000000000 +0100
+++ php-5.3.3/ext/pdo_oci/oci_statement.c	2010-10-06 20:45:24.000000000 +0200
@@ -649,7 +649,7 @@
 
 	if (close_handle) {
 		OCILobClose(self->S->H->svc, self->S->err, self->lob);
-		OCIDescriptorFree(self->lob, OCI_DTYPE_LOB);
+		//OCIDescriptorFree(self->lob, OCI_DTYPE_LOB);
 		efree(self);
 	}
 
Only in php-5.3.3/ext/pdo_oci/: oci_statement.lo
Only in php-5.3.3/ext/pdo_oci/: pdo_oci.la
Only in php-5.3.3/ext/pdo_oci/: pdo_oci.lo
Common subdirectories: php-5.3.3-orig/php-5.3.3/ext/pdo_oci/tests and php-5.3.3/ext/pdo_oci/tests
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 09:02:28 2014 UTC