[svn:dbd-oracle] r14239 - in dbd-oracle/trunk: . t

[email protected]
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: byterock
Date: Thu Jul  8 14:33:50 2010
New Revision: 14239

Modified:
   dbd-oracle/trunk/   (props changed)
   dbd-oracle/trunk/Changes
   dbd-oracle/trunk/Makefile.PL
   dbd-oracle/trunk/Oracle.pm
   dbd-oracle/trunk/Oracle.xs
   dbd-oracle/trunk/Todo
   dbd-oracle/trunk/dbdimp.c
   dbd-oracle/trunk/dbdimp.h
   dbd-oracle/trunk/oci8.c
   dbd-oracle/trunk/ocitrace.h
   dbd-oracle/trunk/t/10general.t
   dbd-oracle/trunk/t/nchar_test_lib.pl

Log:
Merge with DRCP branch and some typos and Pod updates ready for RC1 as well as ociPing and drop support of older client versions

Modified: dbd-oracle/trunk/Changes
==============================================================================
--- dbd-oracle/trunk/Changes	(original)
+++ dbd-oracle/trunk/Changes	Thu Jul  8 14:33:50 2010
@@ -1,5 +1,10 @@
 =head1 Changes in DBD-Oracle 1.25(svn rev )
+  
+  Added support for the OCIPing by John Scoles
+  Spell checked the pod (the first time in a while me thinks) udated the todo By John Scoles
+  Added support for DCRP (Database Resident Connection Pooling) by John Scoles with Luben Karavelov
   Fix for odd error with Ping from Tom Payerle
+  Removed the NEW_OCI_INIT compile 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 
@@ -19,11 +24,9 @@
   to functionality or usage.  The following has been changed
   
   Fixed some formatting and typos in Pod from Julián Patiño
-  
   The Copyright terms for ora_explain have changed and now read as follows:
-  
-  You may distribute under the terms of either the GNU General Public
-  License or the Artistic License, as specified in the Perl README file.
+    You may distribute under the terms of either the GNU General Public
+    License or the Artistic License, as specified in the Perl README file.
   
 =head1 Changes in DBD-Oracle 1.24(svn rev 13793)
 

Modified: dbd-oracle/trunk/Makefile.PL
==============================================================================
--- dbd-oracle/trunk/Makefile.PL	(original)
+++ dbd-oracle/trunk/Makefile.PL	Thu Jul  8 14:33:50 2010
@@ -134,7 +134,7 @@
 
 if (!$OH) {
   $OH = find_oracle_home() || die qq{
-      The $ORACLE_ENV environment variable is not set and I couldn't guess it.
+      The $ORACLE_ENV environment variable is not set and I couldn\'t guess it.
       It must be set to hold the path to an Oracle installation directory
       on this machine (or a machine with a compatible architecture).
       See the appropriate README file for your OS for more information.
@@ -165,8 +165,8 @@
 # $client_version => Major.Minor, $client_version_full => Major.Minor.X.Y.Z
 my ($client_version, $client_version_full) = get_client_version($::opt_V);
 
-die "DBD::Oracle no longer supports Oracle versions before 8.\n"
-    if $client_version < 8;
+die "DBD::Oracle no longer supports Oracle client versions before 9.2 \n Try a version before 1.25 for 9 and 1.18 for 8!"
+    if $client_version < 9;
 
 
 # Check for symbol table problem in libclntsh.dylib.9.0 on MacOS X
@@ -272,7 +272,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
   
@@ -660,12 +660,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\"";
@@ -674,9 +681,17 @@
 # use this if, for some reason the default handling for this function
 # doesn't work or you are building a binary release for distribution
 # to machines with older client libraries.
-$opts{DEFINE} .= " -DORA_OCI_8" if ($::opt_V && $client_version == 8.0)
-				or ($^O eq 'VMS' && $client_version < 9.0); # OCILobIsTemporary
 
+
+print "\nclient_version=$client_version\n\n";
+
+$opts{DEFINE} .= " -DORA_OCI_102" if ($::opt_V && $client_version == 10.2)
+				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
 $opts{DEFINE} .= " -DUSE_ORA_OCI_STMNT_FETCH " if ( $client_version < 9.0 );
  
@@ -1604,7 +1619,7 @@
     if (!$client_version_full) {
 	$client_version_full = "8.0.0.0";
         print qq{
-WARNING: I could not determine Oracle client version so I'll just
+WARNING: I could not determine Oracle client version so I\'ll just
 default to version $client_version_full. Some features of DBD::Oracle may not work.
 Oracle version based logic in Makefile.PL may produce erroneous results.
 You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version.\n

Modified: dbd-oracle/trunk/Oracle.pm
==============================================================================
--- dbd-oracle/trunk/Oracle.pm	(original)
+++ dbd-oracle/trunk/Oracle.pm	Thu Jul  8 14:33:50 2010
@@ -177,8 +177,6 @@
     sub connect {
 	my ($drh, $dbname, $user, $auth, $attr)= @_;
 
-
-        
 	if ($dbname =~ /;/) {
 	    my ($n,$v);
 	    $dbname =~ s/^\s+//;
@@ -191,12 +189,16 @@
 	    } split /\s*;\s*/, $dbname;
 	    my %dbname = ( PROTOCOL => 'tcp', @dbname );
 
+            if ($dbname{SERVER} eq "POOLED") {
+               $attr->{ora_drcp}=1;
+	  
+	    }
 	    # extract main attributes for connect_data portion
-	    my @connect_data_attr = qw(SID INSTANCE_NAME SERVER SERVICE_NAME);
+	    my @connect_data_attr = qw(SID INSTANCE_NAME SERVER SERVICE_NAME );
 	    my %connect_data = map { ($_ => delete $dbname{$_}) }
 		grep { exists $dbname{$_} } @connect_data_attr;
+		
 	    my $connect_data = join "", map { "($_=$connect_data{$_})" } keys %connect_data;
-
 	    return $drh->DBI::set_err(-1,
 		"Can't connect using this syntax without specifying a HOST and one of @connect_data_attr")
 		unless $dbname{HOST} and %connect_data;
@@ -226,6 +228,15 @@
 
 	$user = '' if not defined $user;
         (my $user_only = $user) =~ s:/.*::;
+        
+        if (substr($dbname,-7,7) eq ':POOLED'){
+           $dbname=substr($dbname,0,-7);
+           $attr->{ora_drcp} = 1;
+        }
+        elsif ($ENV{ORA_DRCP}){ 
+	   $attr->{ora_drcp} = 1;
+	}
+	
 	my ($dbh, $dbh_inner) = DBI::_new_dbh($drh, {
 	    'Name' => $dbname,
 	    'dbi_imp_data' => $attr->{dbi_imp_data},
@@ -235,6 +246,31 @@
 
 	# Call Oracle OCI logon func in Oracle.xs file
 	# and populate internal handle data.
+	
+	
+	if (exists $ENV{ORA_DRCP_CLASS}) {
+	   $attr->{ora_drcp_class} = $ENV{ORA_DRCP_CLASS}
+	}
+	if($attr->{ora_drcp_class}){
+	# if using ora_drcp_class it cannot contain more than 1024 bytes 
+	# and cannot contain a *
+	   if (index($attr->{ora_drcp_class},'*') !=-1){
+		Carp::croak("ora_drcp_class cannot contain a '*'!");
+	   }
+	   if (length($attr->{ora_drcp_class}) > 1024){
+		Carp::croak("ora_drcp_class must be less than 1024 characters!");
+	   }
+	}
+	if (exists $ENV{ORA_DRCP_MIN}) {
+	   $attr->{ora_drcp_min} = $ENV{ORA_DRCP_MIN}
+	}
+	if (exists $ENV{ORA_DRCP_MAX}) {
+	   $attr->{ora_drcp_max} = $ENV{ORA_DRCP_MAX}
+	}
+	if (exists $ENV{ORA_DRCP_INCR}) {
+	   $attr->{ora_drcp_incr} = $ENV{ORA_DRCP_INCR}
+	}
+	
 	DBD::Oracle::db::_login($dbh, $dbname, $user, $auth, $attr)
 	    or return undef;
 
@@ -1055,29 +1091,32 @@
 
 =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 
-maintain even more so with the many new functions being introduced in 10g and 11g.
+From version 1.25 onwards DBD::Oracle will only support Oracle clients 9.2 or greater and it will
+be dropping support for ProC connections in 1.26. Sorry for this it was just getting to hard to 
+maintain the code base for an ever shrinking user base. This is especially 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.
 
-  +---------------------+--------------------------------------------+
-  |                     |             Oracle Version                 | 
-  +---------------------+----+-------------+---------+------+--------+
-  | DBD::Oracle Version | <8 | 8.0.3~8.0.6 | 8iR1~R2 | 8iR3 | 9i~11g |
-  +---------------------+----+-------------+---------+------+--------+
-  |      0.1~16         | Y  |      Y      |    Y    |  Y   |    Y   |
-  +---------------------+----+-------------+---------+------+--------+
-  |      1.17           | Y  |      Y      |    Y    |  Y   |    Y   |  
-  +---------------------+----+-------------+---------+------+--------+
-  |      1.18           | N  |      N      |    N    |  Y   |    Y   |
-  +---------------------+----+-------------+---------+------+--------+
-  |      1.19           | N  |      N      |    N    |  Y   |    Y   |
-  +---------------------+----+-------------+---------+------+--------+
-  |      1.20           | N  |      N      |    N    |  Y   |    Y   |
-  +---------------------+----+-------------+---------+------+--------+
-  |      1.21           | N  |      N      |    N    |  N   |    Y   |
-  +---------------------+----+-------------+---------+------+--------+
-  |      1.22           | N  |      N      |    N    |  N   |    Y   |
-  +---------------------+----+-------------+---------+------+--------+
+  +---------------------+-----------------------------------------------------+
+  |                     |                   Oracle Version                    | 
+  +---------------------+----+-------------+---------+------+--------+--------+
+  | DBD::Oracle Version | <8 | 8.0.3~8.0.6 | 8iR1~R2 | 8iR3 |   9i   | 9.2~11 |
+  +---------------------+----+-------------+---------+------+--------+--------+
+  |      0.1~16         | Y  |      Y      |    Y    |  Y   |    Y   |    Y   |
+  +---------------------+----+-------------+---------+------+--------+--------+
+  |      1.17           | Y  |      Y      |    Y    |  Y   |    Y   |    Y   |
+  +---------------------+----+-------------+---------+------+--------+--------+
+  |      1.18           | N  |      N      |    N    |  Y   |    Y   |    Y   |
+  +---------------------+----+-------------+---------+------+--------+--------+
+  |      1.19           | N  |      N      |    N    |  Y   |    Y   |    Y   |
+  +---------------------+----+-------------+---------+------+--------+--------+
+  |      1.20           | N  |      N      |    N    |  Y   |    Y   |    Y   |
+  +---------------------+----+-------------+---------+------+--------+--------+
+  |      1.21~1.24      | N  |      N      |    N    |  N   |    Y   |    Y   |
+  +---------------------+----+-------------+---------+------+--------+--------+
+  |      1.25+          | N  |      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.  
 
@@ -1089,10 +1128,14 @@
   2) If you have to use an Oracle 7 client then DBD::Oracle 1.17 should work
   3) Same thing for 8 up to R2, use 1.17, if you are lucky and have the right patch-set you might go with 1.18.
   4) For 8iR3 you can use any of the DBD::Oracle versions up to 1.21. Again this depends on your patch-set, If you run into trouble go with 1.19
-  5) After 9i you can use any version you want.
+  5) After 9.2 you can use any version you want.
   6) For you Luddites out there ORAPERL still works and is still included but not updated or supported anymore.
-  7) It seems that the 10g client can only connect to 9 and 11 DBs while the 9 can go back to 7 and even get to 10. I am not sure what the 11g client can connect to.
-
+  7) It seems that the 10g client can only connect to 9 and 11 DBs while the 9 can go back to 7 and even get to 10. 
+     I am not sure what the 11g client can connect to.
+  8) DBD::Oracle still has the code in place for ProC. But good luck trying to get it to work with any of the instance clients 
+     as Oracle no longer ships the correct .mk files.  I was unable to get it to work with Oracle 11+ as it ships with only 
+     part of the full ProC install.  You may have to get a full blown version of ProC from Oracle to get it to compile.
+     
 =head1 CONNECTING TO ORACLE
 
 This is a topic which often causes problems. Mainly due to Oracle's many
@@ -1249,7 +1292,7 @@
 
  DBI connect('','system',...) failed: ERROR OCIEnvNlsCreate. 
  
-error in Lunix or in Windows when you get 
+error in Linux or in Windows when you get 
 
   OCI.DLL not found
   
@@ -1324,7 +1367,33 @@
   
 will work as well. Note this may not work for Windows.
 
+=head2 Oracle DRCP
+
+DBD::Oracle now supports DRCP (Database Resident Connection Pool) so if you have an 11.2 database and the DRCP is turned on
+you can now direct all of your connections to it simply adding ':POOLED' to the SID or setting a connection attribute of ora_drcp, or 
+set the SERVER=POOLED when using a TNSENTRY style connection or even by setting an environment variable ORA_DRCP. 
+All of which are demonstrated below;
+
+  $dbh = DBI->connect('dbi:Oracle:DB:POOLED','username','password')
+
+  $dbh = DBI->connect('dbi:Oracle:','username@DB:POOLED','password')
+  
+  $dbh = DBI->connect('dbi:Oracle:DB','username','password',{ora_drcp=>1})
+  
+  $dbh = DBI->connect('dbi:Oracle:DB','username','password',{ora_drcp=>1, ora_drcp_class=>'my_app', ora_drcp_min=>10})
+ 
+  $dbh = DBI->connect('dbi:Oracle:host=foobar;sid=ORCL;port=1521;SERVER=POOLED', 'scott/tiger', '')
+
+  $dbh = DBI->connect('dbi:Oracle:', q{scott/tiger@(DESCRIPTION=
+  (ADDRESS=(PROTOCOL=TCP)(HOST= foobar)(PORT=1521))
+  (CONNECT_DATA=(SID=ORCL)(SERVER=POOLED)))}, "")
 
+  if ORA_DRCP environment var is set the just this
+  
+  $dbh = DBI->connect('dbi:Oracle:DB','username','password')
+ 
+ You can find a white paper on setting up DRCP and its advantages here http://www.oracle.com/technology/tech/oci/pdf/oracledrcp11g.pdf
+   
 =head2 Optimizing Oracle's listener
 
 [By Lane Sharman <[email protected]>] I spent a LOT of time optimizing
@@ -1482,7 +1551,7 @@
 =item ora_ncs_buff_mtpl
 
 You can now customize the size of the buffer when selecting LOBs with
-the built in AUTO Lob.  The default value is 4 which should is actully exessive 
+the built in AUTO Lob.  The default value is 4 which should is actually excessive 
 for most situations but is needed for backward compatibility. 
 If you not converting between a NCS on the DB and the Client then you might 
 want to set this to 1 to free up memory.  
@@ -1493,6 +1562,55 @@
 
 See more details in the LOB section of the POD
 
+=item ora_drcp
+
+If you have an 11.2 or greater database your can utilize the DRCP by setting
+this attribute to 1 at connect time. 
+
+For convenience I have added support for a 'ORA_DRCP'
+environment variable that you can use at the OS level to set this
+value. 
+
+=item ora_drcp_class
+
+If you are using DRCP, you can set a CONNECTION_CLASS for your pools as well.
+As sessions from a DRCP cannot be shared by users, you can use this 
+setting to identify the same user across different applications. OCI will ensure that
+session belonging to a 'class' are not shared outside the class'.
+
+The values for ora_drcp_class cannot contain an '*' and must be less than 1024 characters.
+
+This value can be set at the environment level with 'ORA_DRCP_CLASS'.
+
+=item ora_drcp_min
+
+Is an optional value that specifies the minimum number of sessions that are initially opened.
+New sessions are only opened after this value has been reached.
+
+The default value is '4' and  any value above '0' is valid.
+
+Generally, it should be set to the number of concurrent statements the application is planning 
+or expecting to run.
+
+This value can be set at the environment level with 'ORA_DRCP_MIN'.
+
+=item ora_drcp_max
+
+Is an optional value that specifies the maximum number of sessions that can be open at one time.
+Once reached no more session can be opened until one becomes free. The default value 
+is '40' and any value above '1' is valid.  You should not set this value lower than ora_drcp_min as 
+that will just waste resources.
+
+This value can be set at the environment level with 'ORA_DRCP_MAX'.
+
+=item ora_drcp_incr
+
+Is an optional value that specifies the next increment for sessions to be started if the current number of
+sessions are less than ora_drcp_max. The default value is '2' and  any value above '0' is valid as long
+as the value of ora_drcp_min + ora_drcp_incr is not greater than ora_drcp_max.
+
+This value can be set at the environment level with 'ORA_DRCP_INCR'.
+
 =item ora_session_mode
 
 The ora_session_mode attribute can be used to connect with SYSDBA
@@ -1547,6 +1665,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 connection when the your dbname is set to extproc. 
 
 =item ora_use_proc_connection
 
@@ -1639,9 +1761,9 @@
 
 =item ora_ph_type
 
-The default placeholder data type for the database session.
+The default placeholder datatype for the database session.
 The C<TYPE> or L</ora_type> attributes to L<DBI/bind_param> and
-L<DBI/bind_param_inout> override the data type for individual placeholders.
+L<DBI/bind_param_inout> override the datatype for individual placeholders.
 The most frequent reason for using this attribute is to permit trailing spaces
 in values passed by placeholders.
 
@@ -1790,8 +1912,8 @@
 
 =item 
 
-You can customize the value of the row cache with this value.  By default it will normlly be set to the 
-RowCacheSize or one cles to it.
+You can customize the value of the row cache with this value.  By default it will normally be set to the 
+RowCacheSize or one close to it.
 
 =item ora_verbose
 
@@ -1812,7 +1934,7 @@
 
 =item ora_type
 
-Specify the placeholder's data type using an Oracle data type.
+Specify the placeholder's datatype using an Oracle datatype.
 A fatal error is raised if C<ora_type> and the DBI C<TYPE> attribute
 are used for the same placeholder.
 Some of these types are not supported by the current version of
@@ -1897,14 +2019,14 @@
 
 =head1 Prefetching & Row Caching 
 
-DBD::Oracle now supports both Server pre-fetch and Client side row caching. By defualt both 
-are trurned on to give optimum performance. Most of the time one can just let DBD::Oracle
+DBD::Oracle now supports both Server pre-fetch and Client side row caching. By default both 
+are turned on to give optimum performance. Most of the time one can just let DBD::Oracle
 figure out the best optimization. 
 
 =head2 Row Caching
 
-Row caching occures on the client side and the object of it is to cut down the number of round 
-trips made to the server when fetching rows. At each fetch a set number of rows will be retreived
+Row caching occurs on the client side and the object of it is to cut down the number of round 
+trips made to the server when fetching rows. At each fetch a set number of rows will be retrieved
 from the server and stored locally. Further calls the server are made only when the end of the 
 local buffer(cache) is reached.
 
@@ -1914,9 +2036,9 @@
 the C<RowCacheSize> value is set to a negative number then the positive value of RowCacheSize is used 
 to compute the number of rows to prefetch.
 
-By default C<RowCacheSize> is automatically set. If you want to totaly turn off prefetching set this to 1.
+By default C<RowCacheSize> is automatically set. If you want to totally turn off prefetching set this to 1.
 
-For any SQL statment that contains a LOB, Long or Object Type Row Caching will be turned off. However server side 
+For any SQL statement that contains a LOB, Long or Object Type Row Caching will be turned off. However server side 
 caching still works.  If you are only selecting a LOB Locator then Row Caching will still work.
 
 =head2 Row Prefetching
@@ -2288,7 +2410,7 @@
 =head1 SYS.DBMS_SQL datatypes
 
 DBD::Oracle has built-in support for B<SYS.DBMS_SQL.VARCHAR2_TABLE>
-and B<SYS.DBMS_SQL.NUMBER_TABLE> data types. The simple example is here:
+and B<SYS.DBMS_SQL.NUMBER_TABLE> datatypes. The simple example is here:
 
     my $statement='
     DECLARE
@@ -2430,7 +2552,7 @@
 
 =head1 Other Data Types
 
-DBD::Oracle does not I<explicitly> support most Oracle data types.
+DBD::Oracle does not I<explicitly> support most Oracle datatypes.
 It simply asks Oracle to return them as strings and Oracle does so.
 Mostly.  Similarly when binding placeholder values DBD::Oracle binds
 them as strings and Oracle converts them to the appropriate type,
@@ -3162,7 +3284,7 @@
 
 =head3 Simple Fetch for LONGs and LONG RAWs
 
-As the name implies this is the simplest way to use this interface. DBD::Oracle just attempts to get your LONG data types as a single large piece. 
+As the name implies this is the simplest way to use this interface. DBD::Oracle just attempts to get your LONG datatypes as a single large piece. 
 There are no special settings, simply set the database handle's 'LongReadLen' attribute to a value that will be the larger than the expected size of the LONG or LONG RAW.
 If the size of the LONG or LONG RAW exceeds  the 'LongReadLen' DBD::Oracle will return a 'ORA-24345: A Truncation' error.  To stop this set the database handle's 'LongTruncOk' attribute to '1'.
 The maximum value of 'LongReadLen' seems to be dependent on the physical memory limits of the box that Oracle is running on.  You have most likely reached this limit if you run into
@@ -3205,8 +3327,8 @@
 You can now customize the size of the buffer by setting the 'ora_ncs_buff_mtpl' either on the connection or statement handle. You can
 also set this as 'ORA_DBD_NCS_BUFFER' OS environment variable so you will have to go back and change all your code if you are getting into trouble.
 
-The default value is still set to 4 for backward compatiblty. You can lower this value and thus increase the amount of data you can retreive. If the
-ora_ncs_buff_mtpl is too small DBD::Oracle will thow and error telling you to increase this buffer by one.
+The default value is still set to 4 for backward compatibility. You can lower this value and thus increase the amount of data you can retrieve. If the
+ora_ncs_buff_mtpl is too small DBD::Oracle will throw and error telling you to increase this buffer by one.
 
 If the error is not captured then you may get at some random point later on, usually at a finish() or disconnect() or even a fetch() this error;
 
@@ -3216,7 +3338,7 @@
 
 If you get this, simply increment the ora_ncs_buff_mtpl by one until it goes away.
 
-This should greatly increase your ability to select very large CLOBs or NCLOBs, by freeing up a large block of menory.
+This should greatly increase your ability to select very large CLOBs or NCLOBs, by freeing up a large block of memory.
 
 You can tune this value by setting ora_oci_success_warn which will display the following
 
@@ -3816,7 +3938,7 @@
 the select statement does not require the "FOR UPDATE"
 clause.
 
-A word of catution when using the data retruned from an ora_lob_read in a condtional statement. 
+A word of caution when using the data returned from an ora_lob_read in a conditional statement. 
 for example if the code below;
 
    while( my $data = $dbh->ora_lob_read( $char_locator, $offset, $chunk_size ) ) {
@@ -4054,7 +4176,7 @@
 
 DBD::Oracle does not currently support binding a PL/SQL table (aka array)
 as an IN OUT parameter to any Perl data structure.  You cannot therefore call
-a PL/SQL function or procedure from DBI that uses a non-atomic data type as
+a PL/SQL function or procedure from DBI that uses a non-atomic datatype as
 either a parameter, or a return value.  However, if you are using Oracle 9.0.1
 or later, you can make use of table (or pipelined) functions.
 

Modified: dbd-oracle/trunk/Oracle.xs
==============================================================================
--- dbd-oracle/trunk/Oracle.xs	(original)
+++ dbd-oracle/trunk/Oracle.xs	Thu Jul  8 14:33:50 2010
@@ -263,7 +263,9 @@
 	PREINIT:
 	D_imp_dbh(dbh);
 	sword status;
+#if !defined(ORA_OCI_102)
 	text buf[2];
+#endif
 	CODE:
 	/*simply does a call to OCIServerVersion which should make 1 round trip*/
 	/*later I will replace this with the actual OCIPing command*/
@@ -271,7 +273,11 @@
 	/*If the listener goes down it is another case as the Listener is needed to establish the connection not maintain it*/
 	/*so we should stay connected but we cannot get nay new connections*/
 	{
+#if !defined(ORA_OCI_102)
 	OCIServerVersion_log_stat(imp_dbh->svchp,imp_dbh->errhp,buf,2,OCI_HTYPE_SVCCTX,status);
+#else
+    	OCIPing_log_stat(imp_dbh->svchp,imp_dbh->errhp,status);
+#endif
 	if (status != OCI_SUCCESS){
 		XSRETURN_IV(0);
 	} else {

Modified: dbd-oracle/trunk/Todo
==============================================================================
--- dbd-oracle/trunk/Todo	(original)
+++ dbd-oracle/trunk/Todo	Thu Jul  8 14:33:50 2010
@@ -1,10 +1,14 @@
 [ In no particular order ]
 
 Seems this file has been neglected for quite a while so I will try to keep it up to date for now
+
+For release 1.26 or later
 
-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)
+Add support for TAF
+Add support for New Lob Functions
+Add support for Statement Cacheing
+Add support for callbacks??
+Drop support for ProC connections
 
 For release 1.22 or later
 

Modified: dbd-oracle/trunk/dbdimp.c
==============================================================================
--- dbd-oracle/trunk/dbdimp.c	(original)
+++ dbd-oracle/trunk/dbdimp.c	Thu Jul  8 14:33:50 2010
@@ -366,17 +366,49 @@
 	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*/
+
+#ifdef ORA_OCI_112
+	/*check to see if the user is connecting with DRCP */
+	if (DBD_ATTRIB_TRUE(attr,"ora_drcp",8,svp))
+		imp_dbh->using_drcp = 1;
+
+	/* some connection pool atributes  */
+
+	if ((svp=DBD_ATTRIB_GET_SVP(attr, "ora_drcp_class", 14)) && SvOK(*svp)) {
+		STRLEN  svp_len;
+		if (!SvPOK(*svp))
+			croak("ora_drcp_class is not a string");
+		imp_dbh->pool_class = (text *) SvPV (*svp, svp_len );
+		imp_dbh->pool_classl= (ub4) svp_len;
+    }
+	if (DBD_ATTRIB_TRUE(attr,"ora_drcp_min",12,svp))
+		DBD_ATTRIB_GET_IV( attr, "ora_drcp_min",  12, svp, imp_dbh->pool_min);
+	if (DBD_ATTRIB_TRUE(attr,"ora_drcp_max",12,svp))
+		DBD_ATTRIB_GET_IV( attr, "ora_drcp_max",  12, svp, imp_dbh->pool_max);
+	if (DBD_ATTRIB_TRUE(attr,"ora_drcp_incr",13,svp))
+		DBD_ATTRIB_GET_IV( attr, "ora_drcp_incr",  13, svp, imp_dbh->pool_incr);
+#endif /*ORA_OCI_112*/
+
 	/* 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 +416,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 +445,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 +488,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 +502,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 +544,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 +557,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 +576,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 +596,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 +665,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 +687,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 +736,18 @@
 		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
+#ifdef ORA_OCI_112
+		if (imp_dbh->using_drcp)
+			PerlIO_printf(DBILOGFP," Useing DRCP Connection\n ");
+#endif
 	}
 
-
 	if (!shared_dbh) {
+#if defined(CAN_USE_PRO_C)
 		if(use_proc_connection) {
 #ifdef SQL_SINGLE_RCTX
 
@@ -735,7 +769,7 @@
 				return 0;
 			}
 
-			OCIAttrGet_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, &imp_dbh->authp, NULL,
+			OCIAttrGet_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, &imp_dbh->seshp, NULL,
 					OCI_ATTR_SESSION, imp_dbh->errhp, status);
 			if (status != OCI_SUCCESS) {
 				oci_error(dbh, imp_dbh->errhp, status,
@@ -749,52 +783,142 @@
 #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);
-			OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
-			OCIServerAttach_log_stat(imp_dbh, dbname,OCI_DEFAULT, status);
 
 			if (status != OCI_SUCCESS) {
 				oci_error(dbh, imp_dbh->errhp, status, "OCIServerAttach");
 				OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
-				OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
 				OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
 				return 0;
 			}
-			OCIAttrSet_log_stat( imp_dbh->svchp, OCI_HTYPE_SVCCTX, imp_dbh->srvhp,
-				(ub4) 0, OCI_ATTR_SERVER, imp_dbh->errhp, status);
-			OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->authp, OCI_HTYPE_SESSION, status);
 
 			{
-				ub4  cred_type = ora_parse_uid(imp_dbh, &uid, &pwd);
 				SV **sess_mode_type_sv;
 				ub4  sess_mode_type = OCI_DEFAULT;
+				ub4  cred_type;
 				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);
 
-			}
-			if (status == OCI_SUCCESS_WITH_INFO) {
-			/* eg ORA-28011: the account will expire soon; change your password now */
-				oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
-				status = OCI_SUCCESS;
-			}
-			if (status != OCI_SUCCESS) {
-				oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
-				OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, status);
-				OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
-				OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
-				OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
-				OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
-				return 0;
-			}
+#ifdef ORA_OCI_112
+
+				if (imp_dbh->using_drcp) { /* connect uisng a DRCP */
+					ub4   purity = OCI_ATTR_PURITY_SELF;
+					/* pool Default values */
+					if (!imp_dbh->pool_min )
+						imp_dbh->pool_min = 4;
+					if (!imp_dbh->pool_max )
+						imp_dbh->pool_max = 40;
+					if (!imp_dbh->pool_incr)
+						imp_dbh->pool_incr = 2;
+
+					OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->poolhp, OCI_HTYPE_SPOOL, status);
+
+					OCISessionPoolCreate_log_stat(imp_dbh->envhp,
+							imp_dbh->errhp,
+							imp_dbh->poolhp,
+							(OraText **) &imp_dbh->pool_name,
+							(ub4 *) &imp_dbh->pool_namel,
+							(OraText *) dbname,
+							strlen(dbname),
+							imp_dbh->pool_min,
+							imp_dbh->pool_max,
+							imp_dbh->pool_incr,
+							(OraText *) uid,
+							strlen(uid),
+							pwd,
+							strlen(pwd),
+							status);
+
+					if (status != OCI_SUCCESS) {
+
+						oci_error(dbh, imp_dbh->errhp, status, "OCISessionPoolCreate");
+						OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, status);
+						OCIHandleFree_log_stat(imp_dbh->poolhp, OCI_HTYPE_SPOOL,status);
+						OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
+						OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
+						return 0;
+					}
+
+					OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->authp, OCI_HTYPE_AUTHINFO, status);
+
+					OCIAttrSet_log_stat(imp_dbh->authp, (ub4) OCI_HTYPE_AUTHINFO,
+								&purity, (ub4) 0,(ub4) OCI_ATTR_PURITY, imp_dbh->errhp, status);
 
-			OCIAttrSet_log_stat(imp_dbh->svchp, (ub4) OCI_HTYPE_SVCCTX,
-				imp_dbh->authp, (ub4) 0,
-				(ub4) OCI_ATTR_SESSION, imp_dbh->errhp, status);
+					if (imp_dbh->pool_class) /*pool_class may or may not be used */
+						OCIAttrSet_log_stat(imp_dbh->authp, (ub4) OCI_HTYPE_AUTHINFO,
+								(OraText *) imp_dbh->pool_class, (ub4) imp_dbh->pool_classl,
+								(ub4) OCI_ATTR_CONNECTION_CLASS, imp_dbh->errhp, status);
+
+					cred_type = ora_parse_uid(imp_dbh, &uid, &pwd);
+
+					OCISessionGet_log_stat(imp_dbh->envhp, imp_dbh->errhp, &imp_dbh->svchp, imp_dbh->authp,
+								imp_dbh->pool_name, (ub4)strlen((char *)imp_dbh->pool_name), status);
+
+					if (status != OCI_SUCCESS) {
+
+						oci_error(dbh, imp_dbh->errhp, status, "OCISessionGet");
+						OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, status);
+						OCISessionPoolDestroy(imp_dbh->poolhp, imp_dbh->errhp,status);
+						OCIHandleFree_log_stat(imp_dbh->poolhp, OCI_HTYPE_SPOOL,status);
+						OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
+						OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
+
+						return 0;
+					}
+
+					if (DBIS->debug >= 4 || dbd_verbose >= 4 ) {
+						PerlIO_printf(DBILOGFP,"Using DRCP with session settings min=%d, max=%d, and increment=%d\n",imp_dbh->pool_min,
+							imp_dbh->pool_max,
+							imp_dbh->pool_incr);
+						if (imp_dbh->pool_class)
+							PerlIO_printf(DBILOGFP,"with connection class=%s\n",imp_dbh->pool_class);
+					}
 
+				}
+				else {
+#endif
+
+
+					OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
+					OCIServerAttach_log_stat(imp_dbh, dbname,OCI_DEFAULT, status);
+
+					OCIAttrSet_log_stat( imp_dbh->svchp, OCI_HTYPE_SVCCTX, imp_dbh->srvhp,
+									(ub4) 0, OCI_ATTR_SERVER, imp_dbh->errhp, status);
+
+					OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->seshp, OCI_HTYPE_SESSION, status);
+
+					cred_type = ora_parse_uid(imp_dbh, &uid, &pwd);
+
+					OCISessionBegin_log_stat( imp_dbh->svchp, imp_dbh->errhp, imp_dbh->seshp,cred_type, sess_mode_type, status);
+
+					if (status == OCI_SUCCESS_WITH_INFO) {
+						/* eg ORA-28011: the account will expire soon; change your password now */
+						oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
+						status = OCI_SUCCESS;
+					}
+					if (status != OCI_SUCCESS) {
+						oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
+						OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, status);
+						OCIHandleFree_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,status);
+						OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
+						OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
+						OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
+						return 0;
+					}
+
+					OCIAttrSet_log_stat(imp_dbh->svchp, (ub4) OCI_HTYPE_SVCCTX,
+								imp_dbh->seshp, (ub4) 0,(ub4) OCI_ATTR_SESSION, imp_dbh->errhp, status);
+#ifdef ORA_OCI_112
+				}
+#endif
+			}
+
+#if defined(CAN_USE_PRO_C)
 		} /* use_proc_connection */
+#endif
 	}
 
 dbd_db_login6_out:
@@ -831,15 +955,13 @@
 	sword status;
 	OCITransCommit_log_stat(imp_dbh->svchp, imp_dbh->errhp, OCI_DEFAULT, status);
 	if (status != OCI_SUCCESS) {
-	oci_error(dbh, imp_dbh->errhp, status, "OCITransCommit");
-	return 0;
+		oci_error(dbh, imp_dbh->errhp, status, "OCITransCommit");
+		return 0;
 	}
 	return 1;
 }
 
 
-
-
 int
 dbd_st_cancel(SV *sth, imp_sth_t *imp_sth)
 {
@@ -942,13 +1064,22 @@
 
 	if (refcnt == 1 && !imp_dbh->proc_handles) {
 		sword s_se, s_sd;
-	OCISessionEnd_log_stat(imp_dbh->svchp, imp_dbh->errhp, imp_dbh->authp,
+#ifdef ORA_OCI_112
+		if (imp_dbh->using_drcp) {
+			OCISessionRelease_log_stat(imp_dbh->svchp, imp_dbh->errhp,s_se);
+		}
+		else {
+#endif
+			OCISessionEnd_log_stat(imp_dbh->svchp, imp_dbh->errhp, imp_dbh->seshp,
 			  OCI_DEFAULT, s_se);
-	if (s_se) oci_error(dbh, imp_dbh->errhp, s_se, "OCISessionEnd");
-	OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, s_sd);
-	if (s_sd) oci_error(dbh, imp_dbh->errhp, s_sd, "OCIServerDetach");
-	if (s_se || s_sd)
-		return 0;
+#ifdef ORA_OCI_112
+		}
+#endif
+		if (s_se) oci_error(dbh, imp_dbh->errhp, s_se, "OCISessionEnd");
+		OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, s_sd);
+		if (s_sd) oci_error(dbh, imp_dbh->errhp, s_sd, "OCIServerDetach");
+		if (s_se || s_sd)
+			return 0;
 	}
 	/* We don't free imp_dbh since a reference still exists	*/
 	/* The DESTROY method is the only one to 'free' memory.	*/
@@ -972,16 +1103,28 @@
 #endif
 
 	if (refcnt == 1) {
-	if (DBIc_ACTIVE(imp_dbh))
-		dbd_db_disconnect(dbh, imp_dbh);
-	if (is_extproc)
-		goto dbd_db_destroy_out;
-	if (!imp_dbh->proc_handles)
-	{	sword status;
-		OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
-		OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
-		OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
-	}
+		if (DBIc_ACTIVE(imp_dbh))
+			dbd_db_disconnect(dbh, imp_dbh);
+		if (is_extproc)
+			goto dbd_db_destroy_out;
+		if (!imp_dbh->proc_handles)	{
+			sword status;
+#ifdef ORA_OCI_112
+			if (imp_dbh->using_drcp) {
+				OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
+				OCISessionPoolDestroy_log_stat(imp_dbh->poolhp, imp_dbh->errhp,status);
+				OCIHandleFree_log_stat(imp_dbh->poolhp, OCI_HTYPE_SPOOL,status);
+			}
+			else {
+#endif
+				OCIHandleFree_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,status);
+				OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
+
+#ifdef ORA_OCI_112
+			}
+#endif
+			OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
+		}
 	}
 	OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
 dbd_db_destroy_out:
@@ -994,6 +1137,7 @@
 {
 	dTHX;
 	STRLEN kl;
+	STRLEN vl;
 	char *key = SvPV(keysv,kl);
 	int on = SvTRUE(valuesv);
 	int cacheit = 1;
@@ -1001,6 +1145,24 @@
 	if (kl==17 && strEQ(key, "ora_ncs_buff_mtpl") ) {
 		ora_ncs_buff_mtpl = SvIV (valuesv);
 	}
+#ifdef ORA_OCI_112
+	else if (kl==8 && strEQ(key, "ora_drcp") ) {
+		imp_dbh->using_drcp = 1;
+	}
+	else if (kl==14 && strEQ(key, "ora_drcp_class") ) {
+		imp_dbh->pool_class = (text *) SvPV (valuesv, vl );
+		imp_dbh->pool_classl= (ub4) vl;
+	}
+	else if (kl==12 && strEQ(key, "ora_drcp_min") ) {
+		imp_dbh->pool_min = SvIV (valuesv);
+	}
+	else if (kl==12 && strEQ(key, "ora_drcp_max") ) {
+		imp_dbh->pool_max = SvIV (valuesv);
+	}
+	else if (kl==13 && strEQ(key, "ora_drcp_incr") ) {
+		imp_dbh->pool_incr = SvIV (valuesv);
+	}
+#endif
 	else if (kl==20 && strEQ(key, "ora_oci_success_warn") ) {
 		oci_warn = SvIV (valuesv);
 	}
@@ -3796,7 +3958,7 @@
 
 
 	if (DBIc_DBISTATE(imp_sth)->debug >= 6 || dbd_verbose >= 6 )
-	PerlIO_printf(DBIc_LOGPIO(imp_sth), "	dbd_st_destroy %s\n",
+		PerlIO_printf(DBIc_LOGPIO(imp_sth), "	dbd_st_destroy %s\n",
 		(dirty) ? "(OCIHandleFree skipped during global destruction)" :
 		(imp_sth->nested_cursor) ?"(OCIHandleFree skipped for nested cursor)" : "");
 
@@ -3811,7 +3973,7 @@
 	/* Free off contents of imp_sth	*/
 
 	if (imp_sth->lob_refetch)
-	ora_free_lob_refetch(sth, imp_sth);
+		ora_free_lob_refetch(sth, imp_sth);
 
 	fields = DBIc_NUM_FIELDS(imp_sth);
 	imp_sth->in_cache  = 0;

Modified: dbd-oracle/trunk/dbdimp.h
==============================================================================
--- dbd-oracle/trunk/dbdimp.h	(original)
+++ dbd-oracle/trunk/dbdimp.h	Thu Jul  8 14:33:50 2010
@@ -38,7 +38,19 @@
 	OCIError 	*errhp;
 	OCIServer 	*srvhp;
 	OCISvcCtx 	*svchp;
-	OCISession	*authp;
+	OCISession	*seshp;
+#ifdef ORA_OCI_112
+	OCIAuthInfo *authp;
+	OCISPool    *poolhp;
+	text        *pool_name;
+	ub4			pool_namel;
+	bool		using_drcp;
+	text		*pool_class;
+	ub4			pool_classl;
+	ub4			pool_min;
+	ub4			pool_max;
+	ub4			pool_incr;
+#endif
 	int proc_handles;		   /* If true, srvhp, svchp, and authp handles
 								   are owned by ProC and must not be freed. */
 	int RowCacheSize; /* both of these are defined by DBI spec*/
@@ -265,7 +277,6 @@
 extern int oci_warn;
 extern int ora_objects;
 extern int ora_ncs_buff_mtpl;
-
 extern ub2 charsetid;
 extern ub2 ncharsetid;
 extern ub2 us7ascii_csid;

Modified: dbd-oracle/trunk/oci8.c
==============================================================================
--- dbd-oracle/trunk/oci8.c	(original)
+++ dbd-oracle/trunk/oci8.c	Thu Jul  8 14:33:50 2010
@@ -333,6 +333,9 @@
 	case OCI_HTYPE_DESCRIBE:		return "OCI_HTYPE_DESCRIBE";
 	case OCI_HTYPE_SERVER:			return "OCI_HTYPE_SERVER";
 	case OCI_HTYPE_SESSION:			return "OCI_HTYPE_SESSION";
+	case OCI_HTYPE_CPOOL:   		return "OCI_HTYPE_CPOOL";
+	case OCI_HTYPE_SPOOL:   		return "OCI_HTYPE_SPOOL";
+	/*case OCI_HTYPE_AUTHINFO:        return "OCI_HTYPE_AUTHINFO";*/
 	/* Descriptors */
 	case OCI_DTYPE_LOB:				return "OCI_DTYPE_LOB";
 	case OCI_DTYPE_SNAP:			return "OCI_DTYPE_SNAP";
@@ -409,8 +412,10 @@
 	SV *sv;
 	switch (attr) {
 	/*=============================Attribute Types===============================*/
-
-
+#ifdef ORA_OCI_112
+    case OCI_ATTR_PURITY:				return "OCI_ATTR_PURITY"; /* for DRCP session purity */
+    case OCI_ATTR_CONNECTION_CLASS:		return "OCI_ATTR_CONNECTION_CLASS"; /* for DRCP connection class */
+#endif
 	case OCI_ATTR_FNCODE:				return "OCI_ATTR_FNCODE";		/* the OCI function code */
 	case OCI_ATTR_OBJECT:				return "OCI_ATTR_OBJECT"; /* is the environment initialized in object mode */
 	case OCI_ATTR_NONBLOCKING_MODE:		return "OCI_ATTR_NONBLOCKING_MODE";		/* non blocking mode */
@@ -724,40 +729,43 @@
 	sword eg_status;
 
 	if (!SvOK(errstr))
-	sv_setpv(errstr,"");
+		sv_setpv(errstr,"");
+
 	if (!errhp) {
-	sv_catpv(errstr, oci_status_name(status));
-	if (what) {
-		sv_catpv(errstr, " ");
-		sv_catpv(errstr, what);
-	}
-	return status;
+		sv_catpv(errstr, oci_status_name(status));
+		if (what) {
+			sv_catpv(errstr, " ");
+			sv_catpv(errstr, what);
+		}
+		return status;
 	}
 
 	while( ++recno
-	&& OCIErrorGet_log_stat(errhp, recno, (text*)NULL, &eg_errcode, errbuf,
+		&& OCIErrorGet_log_stat(errhp, recno, (text*)NULL, &eg_errcode, errbuf,
 		(ub4)sizeof(errbuf), OCI_HTYPE_ERROR, eg_status) != OCI_NO_DATA
-	&& eg_status != OCI_INVALID_HANDLE
-	&& recno < 100
-	) {
-	if (debug >= 4 || recno>1/*XXX temp*/)
-		PerlIO_printf(DBILOGFP, "	OCIErrorGet after %s (er%ld:%s): %d, %ld: %s\n",
-		what ? what : "<NULL>", (long)recno,
+		&& eg_status != OCI_INVALID_HANDLE
+		&& recno < 100) {
+		if (debug >= 4 || recno>1/*XXX temp*/)
+			PerlIO_printf(DBILOGFP, "	OCIErrorGet after %s (er%ld:%s): %d, %ld: %s\n",
+			what ? what : "<NULL>", (long)recno,
 			(eg_status==OCI_SUCCESS) ? "ok" : oci_status_name(eg_status),
 			status, (long)eg_errcode, errbuf);
-	errcode = eg_errcode;
-	sv_catpv(errstr, (char*)errbuf);
-	if (*(SvEND(errstr)-1) == '\n')
-		--SvCUR(errstr);
+
+		errcode = eg_errcode;
+		sv_catpv(errstr, (char*)errbuf);
+
+		if (*(SvEND(errstr)-1) == '\n')
+			--SvCUR(errstr);
 	}
+
 	if (what || status != OCI_ERROR) {
-	sv_catpv(errstr, (debug<0) ? " (" : " (DBD ");
-	sv_catpv(errstr, oci_status_name(status));
-	if (what) {
-		sv_catpv(errstr, ": ");
-		sv_catpv(errstr, what);
-	}
-	sv_catpv(errstr, ")");
+		sv_catpv(errstr, (debug<0) ? " (" : " (DBD ");
+		sv_catpv(errstr, oci_status_name(status));
+		if (what) {
+			sv_catpv(errstr, ": ");
+			sv_catpv(errstr, what);
+		}
+		sv_catpv(errstr, ")");
 	}
 	return errcode;
 }
@@ -784,11 +792,11 @@
 	/* DBIc_ERR *must* be SvTRUE (for RaiseError etc), some */
 	/* errors, like OCI_INVALID_HANDLE, don't set errcode. */
 	if (force_err)
-	errcode = force_err;
+		errcode = force_err;
 	if (status == OCI_SUCCESS_WITH_INFO)
-	errcode = 0; /* record as a "warning" for DBI>=1.43 */
+		errcode = 0; /* record as a "warning" for DBI>=1.43 */
 	else if (errcode == 0)
-	errcode = (status != 0) ? status : -10000;
+		errcode = (status != 0) ? status : -10000;
 
 	sv_setiv(errcode_sv, errcode);
 	DBIh_SET_ERR_SV(h, imp_xxh, errcode_sv, errstr_sv, &sv_undef, &sv_undef);
@@ -832,11 +840,12 @@
 {
 	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->seshp;
+	 	/*case OCI_HTYPE_AUTHINFO: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 +858,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 */}
@@ -3871,15 +3880,28 @@
 	if (**uidp == '\0' && **pwdp == '\0') {
 		return OCI_CRED_EXT;
 	}
-
-	OCIAttrSet_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,
+#ifdef ORA_OCI_112
+    if (imp_dbh->using_drcp){
+		OCIAttrSet_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,
 			*uidp, strlen(*uidp),
 			(ub4) OCI_ATTR_USERNAME, imp_dbh->errhp, status);
 
-	OCIAttrSet_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,
+		OCIAttrSet_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,
 			(strlen(*pwdp)) ? *pwdp : NULL, strlen(*pwdp),
 			(ub4) OCI_ATTR_PASSWORD, imp_dbh->errhp, status);
+	}
+	else {
+#endif
+		OCIAttrSet_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,
+				*uidp, strlen(*uidp),
+				(ub4) OCI_ATTR_USERNAME, imp_dbh->errhp, status);
 
+		OCIAttrSet_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,
+				(strlen(*pwdp)) ? *pwdp : NULL, strlen(*pwdp),
+			(ub4) OCI_ATTR_PASSWORD, imp_dbh->errhp, status);
+#ifdef ORA_OCI_112
+	}
+#endif
 	return OCI_CRED_RDBMS;
 }
 
@@ -3892,8 +3914,8 @@
 	/* XXX should possibly create new session before ending the old so	*/
 	/* that if the new one can't be created, the old will still work.	*/
 	OCISessionEnd_log_stat(imp_dbh->svchp, imp_dbh->errhp,
-			imp_dbh->authp, OCI_DEFAULT, status); /* XXX check status here?*/
-	OCISessionBegin_log_stat( imp_dbh->svchp, imp_dbh->errhp, imp_dbh->authp,
+			imp_dbh->seshp, OCI_DEFAULT, status); /* XXX check status here?*/
+	OCISessionBegin_log_stat( imp_dbh->svchp, imp_dbh->errhp, imp_dbh->seshp,
 			 ora_parse_uid(imp_dbh, &uid, &pwd), (ub4) OCI_DEFAULT, status);
 	if (status != OCI_SUCCESS) {
 		oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");

Modified: dbd-oracle/trunk/ocitrace.h
==============================================================================
--- dbd-oracle/trunk/ocitrace.h	(original)
+++ dbd-oracle/trunk/ocitrace.h	Thu Jul  8 14:33:50 2010
@@ -37,12 +37,51 @@
 */
 
 
+#define OCISessionRelease_log_stat(svchp, errhp,stat)\
+	stat =OCISessionRelease(svchp, errhp, NULL, (ub4)0, OCI_DEFAULT);\
+	(DBD_OCI_TRACEON) \
+					? PerlIO_printf(DBD_OCI_TRACEFP,\
+						 "%sOCISessionRelease(svchp=%p)=%s\n",\
+						 OciTp, svchp,oci_status_name(stat)),stat \
+	: stat
+#define OCISessionPoolDestroy_log_stat(ph, errhp,stat )\
+	stat =OCISessionPoolDestroy(ph, errhp,OCI_DEFAULT);\
+	(DBD_OCI_TRACEON) \
+				? PerlIO_printf(DBD_OCI_TRACEFP,\
+					 "%sOCISessionPoolDestroy(ph=%p)=%s\n",\
+					 OciTp, ph,oci_status_name(stat)),stat \
+	: stat
+#define OCISessionGet_log_stat(envhp, errhp, sh, ah,pn,pnl,stat)\
+	stat =OCISessionGet(envhp, errhp, sh, ah,pn,pnl,NULL,0, NULL, NULL, NULL, OCI_SESSGET_SPOOL);\
+	(DBD_OCI_TRACEON) \
+				? PerlIO_printf(DBD_OCI_TRACEFP,\
+					 "%sOCISessionGet(envhp=%p,sh=%p,ah=%p,pn=%p,pnl=%d)=%s\n",\
+					 OciTp, envhp,sh,ah,pn,pnl,oci_status_name(stat)),stat \
+	: stat
+
+#define OCISessionPoolCreate_log_stat(envhp,errhp,ph,pn,pnl,dbn,dbl,sn,sm,si,un,unl,pw,pwl,stat)\
+    stat =OCISessionPoolCreate(envhp,errhp,ph,pn,pnl,dbn,dbl,sn,sm,si,un,unl,pw,pwl,OCI_DEFAULT);\
+    (DBD_OCI_TRACEON) \
+				? PerlIO_printf(DBD_OCI_TRACEFP,\
+					 "%sOCISessionPoolCreate(envhp=%p,ph=%p,pn=%p,pnl=%p,min=%d,max=%d,incr=%d, un=%s,unl=%d,pw=%s,pwl=%d)=%s\n",\
+					 OciTp, envhp,ph,pn,pnl,sn,sm,si,un,unl,pw,pwl,oci_status_name(stat)),stat \
+	: stat
+
+#if defined(ORA_OCI_102)
+#define OCIPing_log_stat(sc,errhp,stat)\
+	stat =OCIPing(sc,errhp,OCI_DEFAULT);\
+	(DBD_OCI_TRACEON) \
+			? PerlIO_printf(DBD_OCI_TRACEFP,\
+				 "%sOCIPing(%p)=%s\n",\
+				 OciTp, sc,oci_status_name(stat)),stat \
+	: stat
+#endif
 
 #define OCIServerVersion_log_stat(sc,errhp,b,bl,ht,stat)\
 	stat =OCIServerVersion(sc,errhp,b,bl,ht);\
 	(DBD_OCI_TRACEON) \
 			? PerlIO_printf(DBD_OCI_TRACEFP,\
-				 "%sCIServerVersion_log_stat(%p,%s)=%s\n",\
+				 "%sOCIServerVersion_log_stat(%p,%s)=%s\n",\
 				 OciTp, sc,b,oci_status_name(stat)),stat \
 	: stat
 
@@ -355,13 +394,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/trunk/t/10general.t
==============================================================================
--- dbd-oracle/trunk/t/10general.t	(original)
+++ dbd-oracle/trunk/t/10general.t	Thu Jul  8 14:33:50 2010
@@ -13,7 +13,7 @@
 
 $| = 1;
 
-plan tests => 31;
+plan tests => 30;
 
 diag('Test preparsing, Active, NLS_NUMERIC_CHARACTERS, err, ping and OCI version');
 
@@ -97,10 +97,6 @@
 
 ok( $dbh->ping, 'ping - connected');
 
-$dbh->disconnect;
-$dbh->{PrintError} = 0;
-ok(!$dbh->ping, 'ping disconnected');
-
 my $ora_oci = DBD::Oracle::ORA_OCI(); # dualvar
 printf "ORA_OCI = %d (%s)\n", $ora_oci, $ora_oci;
 ok("$ora_oci", 'ora_oci defined');

Modified: dbd-oracle/trunk/t/nchar_test_lib.pl
==============================================================================
--- dbd-oracle/trunk/t/nchar_test_lib.pl	(original)
+++ dbd-oracle/trunk/t/nchar_test_lib.pl	Thu Jul  8 14:33:50 2010
@@ -160,8 +160,11 @@
 sub oracle_test_dsn
 {
     my( $default, $dsn ) = ( 'dbi:Oracle:', $ENV{ORACLE_DSN} );
+    
+    
     $dsn ||= $ENV{DBI_DSN} if $ENV{DBI_DSN} && ($ENV{DBI_DSN} =~ /^$default/io);
     $dsn ||= $default;
+    
     return $dsn;
 }
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.