[svn:dbd-oracle] r14137 - in dbd-oracle/branches/DRCP_1.25: . t

[email protected]
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: byterock
Date: Fri Jun 11 10:06:16 2010
New Revision: 14137

Modified:
   dbd-oracle/branches/DRCP_1.25/Changes
   dbd-oracle/branches/DRCP_1.25/Makefile.PL
   dbd-oracle/branches/DRCP_1.25/Oracle.pm
   dbd-oracle/branches/DRCP_1.25/Todo
   dbd-oracle/branches/DRCP_1.25/dbdimp.c
   dbd-oracle/branches/DRCP_1.25/oci8.c
   dbd-oracle/branches/DRCP_1.25/ocitrace.h
   dbd-oracle/branches/DRCP_1.25/t/10general.t

Log:
second successful check in for this now compiles wihtout the old 9 flag and the can_use_pro_C flag

Modified: dbd-oracle/branches/DRCP_1.25/Changes
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/Changes	(original)
+++ dbd-oracle/branches/DRCP_1.25/Changes	Fri Jun 11 10:06:16 2010
@@ -1,5 +1,6 @@
 =head1 Changes in DBD-Oracle 1.25(svn rev )
 
+  Removed the NEW_OCI_INIT compie directive and the depricated OCIInitialize calls
   Fix for rt.cpan.org Ticket #=57256 :  Double free problem in dbdimp.c by John Scoles
   Fix for invalid format in trace of OCILobLocatorIsInit_log_stat reported by Martin Evans Fixed by John Scoles
   Fix for very odd UNKNOWN OCI STATUS 1041 (OCILobFreeTemporary) on disconnect reported by John Parker and Dob Mcgowan fixe by John Scoles 

Modified: dbd-oracle/branches/DRCP_1.25/Makefile.PL
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/Makefile.PL	(original)
+++ dbd-oracle/branches/DRCP_1.25/Makefile.PL	Fri Jun 11 10:06:16 2010
@@ -269,7 +269,7 @@
       Please install OCI or send comments back to dbi-users\@perl.org
       if you have an OCI directory other than $OCIDIR.  
 
-      Alternatively, if you're using ActiveState perl on Windows try
+      Alternatively, if you\'re using ActiveState perl on Windows try
         ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBI.ppd
         ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBD-Oracle.ppd
   
@@ -657,12 +657,19 @@
 
 $opts{DEFINE} .= ' -Xa' if $Config{cc} eq 'clcc';	# CenterLine CC
 
-$opts{DEFINE} .= ' -DCAN_USE_PRO_C' if $::opt_ProC;
+if ($::opt_ProC) {
+	$opts{DEFINE} .= ' -DCAN_USE_PRO_C' ;
+	print "Seems you want to use ProC connections. Both the Instant Clients and Oracle XE client may not work!!\n\n";
+}
+
+	
+
+
 
 $opts{DEFINE} .= ' -DUTF8_SUPPORT' if ($] >= 5.006);
 
 # Use OCIEnvNlsCreate if available for best unicode behaviour
-$opts{DEFINE} .= ' -DNEW_OCI_INIT' if $client_version >= 9.2;
+#$opts{DEFINE} .= ' -DNEW_OCI_INIT' if $client_version >= 9.2;
 $opts{DEFINE} .= ($os ne 'VMS')
 	? " -DORA_OCI_VERSION=\\\"$client_version_full\\\""
 	: " -DORA_OCI_VERSION=\"$client_version_full\"";
@@ -676,7 +683,10 @@
 print "\nclient_version=$client_version\n\n";
 
 $opts{DEFINE} .= " -DORA_OCI_102" if ($::opt_V && $client_version == 10.2)
-				or ( $client_version >= 10.2); # OCILobIsTemporary
+				or ( $client_version >= 10.2); 
+
+$opts{DEFINE} .= " -DORA_OCI_112" if ($::opt_V && $client_version == 11.2)
+				or ( $client_version >= 11.2); 
 
 print "\DEFINE=$opts{DEFINE}\n\n";
 # OCIStmntFetch2() is a feature of OCI 9.0.0

Modified: dbd-oracle/branches/DRCP_1.25/Oracle.pm
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/Oracle.pm	(original)
+++ dbd-oracle/branches/DRCP_1.25/Oracle.pm	Fri Jun 11 10:06:16 2010
@@ -1054,7 +1054,7 @@
 
 =head1 Which version DBD::Oracle is for me?
 
-Since version 1.22 DBD::Oracle only supports Oracle clients 9 or greater. Sorry for this it was just getting to hard to 
+Since version 1.25 DBD::Oracle only supports Oracle clients 9.2 or greater. Sorry for this it was just getting to hard to 
 maintain even more so with the many new functions being introduced in 10g and 11g.
 If you are still stuck with an older version of Oracle or its client you might want to look at the table below.
 
@@ -1075,7 +1075,7 @@
   +---------------------+----+-------------+---------+------+--------+
   |      1.21           | N  |      N      |    N    |  N   |    Y   |
   +---------------------+----+-------------+---------+------+--------+
-  |      1.22           | N  |      N      |    N    |  N   |    Y   |
+  |      1.22+          | N  |      N      |    N    |  N   |    Y   |
   +---------------------+----+-------------+---------+------+--------+
 
 As there are dozens and dozens of different versions of Oracle's clients I did not bother to list any of them, just the major release versions of Oracle that are out there.  
@@ -1546,6 +1546,10 @@
   our $orashr : shared = '' ;
 
   $dbh = DBI->connect ($dsn, $user, $passwd, {ora_dbh_share => \$orashr}) ;
+  
+=item ora_context
+
+Use this attribute to send a pointer to a ProC conection when the your dbname is set to extproc. 
 
 =item ora_use_proc_connection
 

Modified: dbd-oracle/branches/DRCP_1.25/Todo
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/Todo	(original)
+++ dbd-oracle/branches/DRCP_1.25/Todo	Fri Jun 11 10:06:16 2010
@@ -4,7 +4,7 @@
 
 For release 1.23 or later
 
-Drop support for early 9 versions namely support for NEW_OCI_INIT (get rid of the old code in here)
+--> done 1.25 Drop support for early 9 versions namely support for NEW_OCI_INIT (get rid of the old code in here)
 
 For release 1.22 or later
 

Modified: dbd-oracle/branches/DRCP_1.25/dbdimp.c
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/dbdimp.c	(original)
+++ dbd-oracle/branches/DRCP_1.25/dbdimp.c	Fri Jun 11 10:06:16 2010
@@ -366,17 +366,26 @@
 	SV **svp;
 	shared_sv * shared_dbh_ssv = NULL ;
 	imp_dbh_t * shared_dbh	 = NULL ;
+    D_imp_drh_from_dbh;
+	ub2 new_charsetid = 0;
+	ub2 new_ncharsetid = 0;
 #if defined(USE_ITHREADS) && defined(PERL_MAGIC_shared_scalar)
 	SV **	shared_dbh_priv_svp ;
 	SV *	shared_dbh_priv_sv ;
 	STRLEN	shared_dbh_len  = 0 ;
 #endif
+#if defined(CAN_USE_PRO_C)
 	struct OCIExtProcContext *this_ctx;
 	ub4 use_proc_connection = 0;
 	SV **use_proc_connection_sv;
-	D_imp_drh_from_dbh;
-	ub2 new_charsetid = 0;
-	ub2 new_ncharsetid = 0;
+
+ /* Check if we should re-use a ProC connection and not connect ourselves. */
+	DBD_ATTRIB_GET_IV(attr, "ora_use_proc_connection", 23,
+			use_proc_connection_sv, use_proc_connection);
+#else /*CAN_USE_PRO_C*/
+    if (DBD_ATTRIB_TRUE(attr,"ora_use_proc_connection",23,svp))
+      	croak ("You can only use a ProC connection, if your DBD::Oracle was built with the -ProC on the Makefile.PL") ;
+#endif /*CAN_USE_PRO_C*/
 	/* check to see if DBD_verbose or ora_verbose is set*/
 	if (DBD_ATTRIB_TRUE(attr,"dbd_verbose",11,svp))
 		DBD_ATTRIB_GET_IV(  attr, "dbd_verbose",  11, svp, dbd_verbose);
@@ -384,11 +393,20 @@
 		DBD_ATTRIB_GET_IV(  attr, "ora_verbose",  11, svp, dbd_verbose);
 
 
+	/* check to see if success_warn is set. This will */
+	/* warn after some sucessfull operations for tuning results */
 	if (DBD_ATTRIB_TRUE(attr,"ora_oci_success_warn",20,svp))
 		DBD_ATTRIB_GET_IV(  attr, "ora_oci_success_warn",  20, svp, oci_warn);
+
+	/* check to see if ora_objects set*/
+	/* with this set any embedded types will go into a DBD::Oracle::Object */
+	/* rather than just an ref array */
 	if (DBD_ATTRIB_TRUE(attr,"ora_objects",11,svp))
 		DBD_ATTRIB_GET_IV(  attr, "ora_objects",11, svp, ora_objects);
 
+	if (DBIS->debug >= 6 || dbd_verbose >= 6 )
+		dump_env_to_trace();
+
 	/* dbi_imp_data code adapted from DBD::mysql */
 	if (DBIc_has(imp_dbh, DBIcf_IMPSET)) {
 		/* dbi_imp_data from take_imp_data */
@@ -404,6 +422,7 @@
 			PerlIO_printf(DBILOGFP,
 				"dbd_db_login6 IMPSET but not ACTIVE so connect not skipped\n");
 	}
+
 	imp_dbh->envhp = imp_drh->envhp;	/* will be NULL on first connect */
 
 #if defined(USE_ITHREADS) && defined(PERL_MAGIC_shared_scalar)
@@ -446,20 +465,13 @@
 	}
 #endif
 
-	/* Check if we should re-use a ProC connection and not connect ourselves. */
-
-	DBD_ATTRIB_GET_IV(attr, "ora_use_proc_connection", 23,
-			use_proc_connection_sv, use_proc_connection);
-
 	imp_dbh->get_oci_handle = oci_db_handle;
 
-	if (DBIS->debug >= 6 || dbd_verbose >= 6 )
-		dump_env_to_trace();
-
 	if ((svp=DBD_ATTRIB_GET_SVP(attr, "ora_envhp", 9)) && SvOK(*svp)) {
 		if (!SvTRUE(*svp)) {
 			imp_dbh->envhp = NULL; /* force new environment */
 		}
+#if defined(CAN_USE_PRO_C)
 		else {
 			IV tmp;
 			if (!sv_isa(*svp, "ExtProc::OCIEnvHandle"))
@@ -467,8 +479,9 @@
 			tmp = SvIV((SV*)SvRV(*svp));
 			imp_dbh->envhp = (struct OCIEnv *)tmp;
 		}
+#endif /*CAN_USE_PRO_C*/
 	}
-
+#if defined(CAN_USE_PRO_C)
 	/* "extproc" dbname is special if "ora_context" attribute also given */
 	if (strEQ(dbname,"extproc") && (svp=DBD_ATTRIB_GET_SVP(attr, "ora_context", 11))) {
 		IV tmp;
@@ -508,7 +521,11 @@
 		goto dbd_db_login6_out;
 	}
 
-	if (!imp_dbh->envhp || is_extproc) {
+	if (!imp_dbh->envhp || is_extproc)
+#else /*CAN_USE_PRO_C*/
+    if (!imp_dbh->envhp )
+#endif
+    {
 		SV **init_mode_sv;
 		ub4 init_mode = OCI_OBJECT;	/* needed for LOBs (8.0.4)	*/
 		DBD_ATTRIB_GET_IV(attr, "ora_init_mode",13, init_mode_sv, init_mode);
@@ -517,6 +534,7 @@
 		init_mode |= OCI_THREADED;
 #endif
 
+#if defined(CAN_USE_PRO_C)
 		if (use_proc_connection) {
 			char *err_hint = Nullch;
 #ifdef SQL_SINGLE_RCTX
@@ -535,13 +553,11 @@
 				return 0;
 			}
 		}
-		else {		/* Normal connect. */
-
+		else 		/* Normal connect. */
+#endif /*CAN_USE_PRO_C*/
+			{
 			size_t rsize = 0;
 			imp_dbh->proc_handles = 0;
-
-#ifdef NEW_OCI_INIT	/* XXX needs merging into use_proc_connection branch */
-
 			/* Get CLIENT char and nchar charset id values */
 			OCINlsEnvironmentVariableGet_log_stat( &charsetid,(size_t) 0, OCI_NLS_CHARSET_ID, 0, &rsize ,status );
 			if (status != OCI_SUCCESS) {
@@ -557,28 +573,29 @@
 				return 0;
 			}
 
-		/*{
-		After using OCIEnvNlsCreate() to create the environment handle,
-		**the actual lengths and returned lengths of bind and define handles are
-		always in number of bytes**. This applies to the following calls:
-
-		* OCIBindByName()   * OCIBindByPos()	  * OCIBindDynamic()
-		* OCIDefineByPos()  * OCIDefineDynamic()
-
-		This function enables you to set charset and ncharset ids at
-		environment creation time. [...]
-
-		This function sets nonzero charset and ncharset as client side
-		database and national character sets, replacing the ones specified
-		by NLS_LANG and NLS_NCHAR. When charset and ncharset are 0, it
-		behaves exactly the same as OCIEnvCreate(). Specifically, charset
-		controls the encoding for metadata and data with implicit form
-		attribute and ncharset controls the encoding for data with SQLCS_NCHAR
-		form attribute.
-		}*/
+			/*{
+			After using OCIEnvNlsCreate() to create the environment handle,
+			**the actual lengths and returned lengths of bind and define handles are
+			always in number of bytes**. This applies to the following calls:
+
+			* OCIBindByName()   * OCIBindByPos()	  * OCIBindDynamic()
+			* OCIDefineByPos()  * OCIDefineDynamic()
+
+			This function enables you to set charset and ncharset ids at
+			environment creation time. [...]
+
+			This function sets nonzero charset and ncharset as client side
+			database and national character sets, replacing the ones specified
+			by NLS_LANG and NLS_NCHAR. When charset and ncharset are 0, it
+			behaves exactly the same as OCIEnvCreate(). Specifically, charset
+			controls the encoding for metadata and data with implicit form
+			attribute and ncharset controls the encoding for data with SQLCS_NCHAR
+			form attribute.
+			}*/
 
 			OCIEnvNlsCreate_log_stat( &imp_dbh->envhp, init_mode, 0, NULL, NULL, NULL, 0, 0,
-			charsetid, ncharsetid, status );
+				charsetid, ncharsetid, status );
+
 			if (status != OCI_SUCCESS) {
 				oci_error(dbh, NULL, status,
 					"OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var  or PATH (Windows) and or NLS settings, permissions, etc.");
@@ -625,34 +642,16 @@
 			}
 
 			/* update the hard-coded csid constants for unicode charsets */
-			utf8_csid	  = OCINlsCharSetNameToId(imp_dbh->envhp, (void*)"UTF8");
+			utf8_csid	   = OCINlsCharSetNameToId(imp_dbh->envhp, (void*)"UTF8");
 			al32utf8_csid  = OCINlsCharSetNameToId(imp_dbh->envhp, (void*)"AL32UTF8");
 			al16utf16_csid = OCINlsCharSetNameToId(imp_dbh->envhp, (void*)"AL16UTF16");
-
-#else /* (the old init code) NEW_OCI_INIT */
-		/* this is now depricated and will be removed as we no longer support <9.2 oracle*/
-		/* XXX recent oracle docs recommend using OCIEnvCreate() instead of	*/
-		/* OCIInitialize + OCIEnvInit, we'd need ifdef's for pre-OCIEnvNlsCreate */
-			OCIInitialize_log_stat(init_mode, 0, 0,0,0, status);
-
-
-			if (status != OCI_SUCCESS) {
-				oci_error(dbh, NULL, status,
-				"OCIInitialize. Check Check ORACLE_HOME (Linux) env var  or PATH (Windows) and or NLS settings, permissions, etc");
-				return 0;
-			}
-
-			OCIEnvInit_log_stat( &imp_dbh->envhp, OCI_DEFAULT, 0, 0, status);
-			if (status != OCI_SUCCESS) {
-				oci_error(dbh, (OCIError*)imp_dbh->envhp, status, "OCIEnvInit");
-				return 0;
-			}
-#endif /* NEW_OCI_INIT */
 		}
+
 	}
 
 	if (shared_dbh_ssv) { /*is this a cached or shared handle from DBI*/
 		if (!imp_dbh->envhp) { /*no hande so create a new one*/
+#if defined(CAN_USE_PRO_C)
 			if (use_proc_connection) {
 				char *err_hint = Nullch;
 #ifdef SQL_SINGLE_RCTX
@@ -665,43 +664,47 @@
 				if (status != SQL_SUCCESS) {
 					if (!err_hint)
 						err_hint = "SQLEnvGet failed to load ProC environment";
-					oci_error(dbh, (OCIError*)imp_dbh->envhp, status, err_hint);
-					return 0;
-				}
+						oci_error(dbh, (OCIError*)imp_dbh->envhp, status, err_hint);
+						return 0;
+					}
 			}
 			else {
+#endif
 				OCIEnvInit_log_stat( &imp_dbh->envhp, OCI_DEFAULT, 0, 0, status);
 				imp_dbh->proc_handles = 0;
 				if (status != OCI_SUCCESS) {
 					oci_error(dbh, (OCIError*)imp_dbh->envhp, status, "OCIEnvInit");
 					return 0;
 				}
+#if defined(CAN_USE_PRO_C)
 			}
+#endif
 		}
 	}
-	OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
-
-#ifndef NEW_OCI_INIT /* have to get charsetid & ncharsetid the old way this code should go as well as it is for <9.2 oracle*/
 
+	OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
 	OCIAttrGet_log_stat(imp_dbh->envhp, OCI_HTYPE_ENV, &charsetid, (ub4)0 ,
 			OCI_ATTR_ENV_CHARSET_ID, imp_dbh->errhp, status);
+
 	if (status != OCI_SUCCESS) {
 		oci_error(dbh, imp_dbh->errhp, status, "OCIAttrGet OCI_ATTR_ENV_CHARSET_ID");
 		return 0;
 	}
+
 	OCIAttrGet_log_stat(imp_dbh->envhp, OCI_HTYPE_ENV, &ncharsetid, (ub4)0 ,
 			OCI_ATTR_ENV_NCHARSET_ID, imp_dbh->errhp, status);
+
 	if (status != OCI_SUCCESS) {
 		oci_error(dbh, imp_dbh->errhp, status, "OCIAttrGet OCI_ATTR_ENV_NCHARSET_ID");
 		return 0;
 	}
-#endif
 
 	/* At this point we have charsetid & ncharsetid
 	*  note that it is possible for charsetid and ncharestid to
 	*  be distinct if NLS_LANG and NLS_NCHAR are both used.
 	*  BTW: NLS_NCHAR is set as follows: NSL_LANG=AL32UTF8
 	*/
+
 	if (DBIS->debug >= 3 || dbd_verbose >= 3 ) {
 		oratext  charsetname[OCI_NLS_MAXBUFSZ];
 		oratext  ncharsetname[OCI_NLS_MAXBUFSZ];
@@ -710,10 +713,15 @@
 		PerlIO_printf(DBILOGFP,"	   charset id=%d, name=%s, ncharset id=%d, name=%s"
 		" (csid: utf8=%d al32utf8=%d)\n",
 		 charsetid,charsetname, ncharsetid,ncharsetname, utf8_csid, al32utf8_csid);
+#if defined(CAN_USE_PRO_C)
+		if (imp_dbh->proc_handles)
+			PerlIO_printf(DBILOGFP," Useing a ProC Connection\n");
+#endif
 	}
 
 
 	if (!shared_dbh) {
+#if defined(CAN_USE_PRO_C)
 		if(use_proc_connection) {
 #ifdef SQL_SINGLE_RCTX
 
@@ -749,6 +757,8 @@
 #endif /* SQL_SINGLE_RCTX*/
 		}
 		else {			/* !use_proc_connection */
+#endif /*CAN_USE_PRO_C*/
+
 			imp_dbh->proc_handles = 0;
 
 			OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
@@ -771,9 +781,23 @@
 				SV **sess_mode_type_sv;
 				ub4  sess_mode_type = OCI_DEFAULT;
 				DBD_ATTRIB_GET_IV(attr, "ora_session_mode",16, sess_mode_type_sv, sess_mode_type);
-				OCISessionBegin_log_stat( imp_dbh->svchp, imp_dbh->errhp, imp_dbh->authp,
-					cred_type, sess_mode_type, status);
+/*#ifdef ORA_OCI_112
+				if (sess_mode_type == OCI_DEFAULT) {
+					OCISPool drcp_pool;
+					OraText  *poolname;			/* session pool name
+					unsigned int poolnamelen;	/* length of session pool name
+					OraText dbname ='xe';
+					unsigned int *dbname_len=2;
+					OCISessionPoolCreate_log_stat(imp_dbh->envhp,imp_dbh->errhp,drcp_pool,&poolname,&poolnamelen,&dbname,&dbname_len,5,500,4,status);
+				    PerlIO_printf(DBILOGFP, "hi mom\n");
 
+				}
+				else {
+#endif*/
+				OCISessionBegin_log_stat( imp_dbh->svchp, imp_dbh->errhp, imp_dbh->authp,cred_type, sess_mode_type, status);
+/*#ifdef ORA_OCI_112
+				}
+#endif*/
 			}
 			if (status == OCI_SUCCESS_WITH_INFO) {
 			/* eg ORA-28011: the account will expire soon; change your password now */
@@ -793,8 +817,9 @@
 			OCIAttrSet_log_stat(imp_dbh->svchp, (ub4) OCI_HTYPE_SVCCTX,
 				imp_dbh->authp, (ub4) 0,
 				(ub4) OCI_ATTR_SESSION, imp_dbh->errhp, status);
-
+#if defined(CAN_USE_PRO_C)
 		} /* use_proc_connection */
+#endif
 	}
 
 dbd_db_login6_out:

Modified: dbd-oracle/branches/DRCP_1.25/oci8.c
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/oci8.c	(original)
+++ dbd-oracle/branches/DRCP_1.25/oci8.c	Fri Jun 11 10:06:16 2010
@@ -832,11 +832,11 @@
 {
 	dTHX;
 	 switch(handle_type) {
-	 case OCI_HTYPE_ENV:	return imp_dbh->envhp;
-	 case OCI_HTYPE_ERROR:	return imp_dbh->errhp;
-	 case OCI_HTYPE_SERVER:	return imp_dbh->srvhp;
-	 case OCI_HTYPE_SVCCTX:	return imp_dbh->svchp;
-	 case OCI_HTYPE_SESSION:	return imp_dbh->authp;
+	 	case OCI_HTYPE_ENV:	return imp_dbh->envhp;
+	 	case OCI_HTYPE_ERROR:	return imp_dbh->errhp;
+	 	case OCI_HTYPE_SERVER:	return imp_dbh->srvhp;
+	 	case OCI_HTYPE_SVCCTX:	return imp_dbh->svchp;
+	 	case OCI_HTYPE_SESSION:	return imp_dbh->authp;
 	 }
 	 croak("Can't get OCI handle type %d from DBI database handle", handle_type);
 	 if( flags ) {/* For GCC not to warn on unused parameter */}
@@ -849,11 +849,11 @@
 {
 	dTHX;
 	 switch(handle_type) {
-	 case OCI_HTYPE_ENV:	return imp_sth->envhp;
-	 case OCI_HTYPE_ERROR:	return imp_sth->errhp;
-	 case OCI_HTYPE_SERVER:	return imp_sth->srvhp;
-	 case OCI_HTYPE_SVCCTX:	return imp_sth->svchp;
-	 case OCI_HTYPE_STMT:	return imp_sth->stmhp;
+	 	case OCI_HTYPE_ENV:	return imp_sth->envhp;
+		case OCI_HTYPE_ERROR:	return imp_sth->errhp;
+	 	case OCI_HTYPE_SERVER:	return imp_sth->srvhp;
+	 	case OCI_HTYPE_SVCCTX:	return imp_sth->svchp;
+	 	case OCI_HTYPE_STMT:	return imp_sth->stmhp;
 	 }
 	 croak("Can't get OCI handle type %d from DBI statement handle", handle_type);
 	 if( flags ) {/* For GCC not to warn on unused parameter */}

Modified: dbd-oracle/branches/DRCP_1.25/ocitrace.h
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/ocitrace.h	(original)
+++ dbd-oracle/branches/DRCP_1.25/ocitrace.h	Fri Jun 11 10:06:16 2010
@@ -36,6 +36,15 @@
 	If done well the log will read like a compilable program.
 */
 
+
+#define OCISessionPoolCreate_log_stat(envhp,errhp,ph,pn,pnl,cs,csl,min,max,incr,stat)\
+    stat =OCISessionPoolCreate(envhp,errhp,ph,pn,pnl,cs,csl,min,max,incr,(OraText *)0, (ub4)0, (OraText *)0,(ub4)0, OCI_DEFAULT)\
+    (DBD_OCI_TRACEON) \
+				? PerlIO_printf(DBD_OCI_TRACEFP,\
+					 "%OCISessionPoolCreate(%p,%p,%s,min=%d,max=%d,incr=%d)=%s\n",\
+					 OciTp, envhp,errhp,ph,pn,min,max,incr,oci_status_name(stat)),stat \
+	: stat
+
 #if defined(ORA_OCI_102)
 #define OCIPing_log_stat(sc,errhp,stat)\
 	stat =OCIPing(sc,errhp,OCI_DEFAULT);\
@@ -363,13 +372,6 @@
 		"%sHandleFree(%p,%s)=%s\n",OciTp,(void*)hp,oci_hdtype_name(t),		\
 		oci_status_name(stat)),stat : stat
 
-#define OCIInitialize_log_stat(md,cp,mlf,rlf,mfp,stat)				 \
-	stat=OCIInitialize(md,cp,mlf,rlf,mfp);				\
-	(DBD_OCI_TRACEON) ? PerlIO_printf(DBD_OCI_TRACEFP,			\
-		"%sInitialize(with mode =%s %lu,%p,%p,%p,%p)=%s\n",				\
-		OciTp, oci_mode(md),ul_t(md),(void*)cp,(void*)mlf,(void*)rlf,(void*)mfp,	\
-		oci_status_name(stat)),stat : stat
-
 #define OCILobGetLength_log_stat(sh,eh,lh,l,stat)						\
 	stat=OCILobGetLength(sh,eh,lh,l);				\
 	(DBD_OCI_TRACEON) ? PerlIO_printf(DBD_OCI_TRACEFP,			\

Modified: dbd-oracle/branches/DRCP_1.25/t/10general.t
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/t/10general.t	(original)
+++ dbd-oracle/branches/DRCP_1.25/t/10general.t	Fri Jun 11 10:06:16 2010
@@ -20,10 +20,7 @@
 my $dsn = oracle_test_dsn();
 my $dbuser = $ENV{ORACLE_USERID} || 'scott/tiger';
 my $dbh = DBI->connect($dsn, $dbuser, '');
-$dbh->{dbd_verbose}=15;
-warn ("ping=".$dbh->ping());
 
-exit;
 unless($dbh) {
     BAIL_OUT("Unable to connect to Oracle ($DBI::errstr)\nTests skipped.\n");
     exit 0;
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.