[svn:dbd-oracle] r15018 - dbd-oracle/trunk

[email protected] Fri, 25 Nov 2011 11:27:09 -0800 (PST)
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: mjevans
Date: Fri Nov 25 11:27:08 2011
New Revision: 15018

Modified:
   dbd-oracle/trunk/Changes
   dbd-oracle/trunk/Oracle.pm

Log:
rt72716 - document problems with ora_connect_with_default_signals and connect_cached


Modified: dbd-oracle/trunk/Changes
==============================================================================
--- dbd-oracle/trunk/Changes	(original)
+++ dbd-oracle/trunk/Changes	Fri Nov 25 11:27:08 2011
@@ -2,12 +2,18 @@
 
 Changes in DBD-Oracle X.XX (XX-XX-XXXX)
 
- [BEG FIXES]
+ [BUG FIXES]
 
  - applied patch from Charles Jardine avoiding undefined values
    warnings in ora_server_version when the database is not open
    [RT72623] (Martin J. Evans)
 
+ [DOCUMENTATION]
+
+ - [rt72716] Document possible problem with
+   ora_connect_with_default_signals and connect_cached
+   (Martin J. Evans)
+
 Changes in DBD-Oracle 1.35_00 (18-11-2011)
 
  [BUG FIXES]

Modified: dbd-oracle/trunk/Oracle.pm
==============================================================================
--- dbd-oracle/trunk/Oracle.pm	(original)
+++ dbd-oracle/trunk/Oracle.pm	Fri Nov 25 11:27:08 2011
@@ -148,7 +148,7 @@
 
 	# get list of 'remote' database connection identifiers
 	my @tns_admin = ( DBD::Oracle::ora_env_var("TNS_ADMIN"), '.' );
-	push @tns_admin, map { join '/', $oracle_home, $_ }     
+	push @tns_admin, map { join '/', $oracle_home, $_ }
                          'network/admin',	# OCI 7 and 8.1
                          'net80/admin',	    # OCI 8.0
 	    if $oracle_home;
@@ -650,7 +650,7 @@
                         )
          , 'FLOAT'    , tc.DATA_PRECISION
          , 'DATE'     , 19
-         , 'VARCHAR2' , tc.CHAR_LENGTH 
+         , 'VARCHAR2' , tc.CHAR_LENGTH
          , tc.DATA_LENGTH
          )                   COLUMN_SIZE
        , decode( tc.DATA_TYPE
@@ -1250,7 +1250,7 @@
 
 =head3 Oracle Environment Variables
 
-To use DBD::ORACLE to connect to an Oracle database, ORACLE_HOME environment variable should be set correctly.  
+To use DBD::ORACLE to connect to an Oracle database, ORACLE_HOME environment variable should be set correctly.
 In general, the value used should match the version of Oracle that was used to build DBD::Oracle.  If using dynamic linking then ORACLE_HOME should match the version of Oracle that will be used to load in the Oracle client libraries (via LD_LIBRARY_PATH, ldconfig, or similar on Unix).
 
 Oracle can use two environment variables to specify default connections: ORACLE_SID and TWO_TASK.
@@ -1594,7 +1594,7 @@
 
 =head4 ora_dbh_share
 
-Requires at least Perl 5.8.0 compiled with ithreads. 
+Requires at least Perl 5.8.0 compiled with ithreads.
 
 Allows you to share
 database connections between threads. The first connect will make the
@@ -1759,9 +1759,21 @@
 NOTE disabling the signal handlers the OCI library sets up may affect
 functionality in the OCI library.
 
+NOTE If you are using connect_cached then the above example will lead
+to DBI thinking each connection is different as an anonymous array reference
+is being used. To avoid this when using connect_cached you are advised
+to use:
+
+  my @ora_default_signals = (...);
+  $dbh = DBI->connect($dsn, $user, $passwd,
+      {ora_connect_with_default_signals => \@ora_default_signals});
+
+In more recent Perl versions you could possibly make use of new state
+variables.
+
 =head2 B<connect_cached>
 
-Implemented by DBI, no driver-specific impact. 
+Implemented by DBI, no driver-specific impact.
 Please note that connect_cached as not been tested with DRCP.
 
 =head2 B<data_sources>
@@ -2288,7 +2300,7 @@
 
 Issues a ROLLBACK to the server, which discards any changes made in the current transaction. If AutoCommit
 is enabled, then a warning is given and no ROLLBACK is issued. Returns true on success, and
-false on error. 
+false on error.
 
 =head2 B<begin_work>
 
@@ -2484,7 +2496,7 @@
 
 Supported by DBD::Oracle as proposed by DBI.The default of AutoCommit is on, but this may change
 in the future, so it is highly recommended that you explicitly set it when
-calling L</connect>. 
+calling L</connect>.
 
 =head2 B<ReadOnly> (boolean)
 
@@ -5236,7 +5248,7 @@
 =head2 GitHub repository
 
 A git mirror of the subversion is also available at
-`https://github.com/yanick/DBD-Oracle`. 
+`https://github.com/yanick/DBD-Oracle`.
 
 =head1 Oracle Related Links
 
@@ -5312,8 +5324,8 @@
 
 =head1 BUGS AND LIMITATIONS
 
-There is a known problem with the 11.2g Oracle client and the 
-C<DBMS_LOB.GETLENGTH()> PL/SQL function.  
+There is a known problem with the 11.2g Oracle client and the
+C<DBMS_LOB.GETLENGTH()> PL/SQL function.
 See L<https://rt.cpan.org/Public/Bug/Display.html?id=69350> for the details.
 
 
@@ -5365,7 +5377,7 @@
 
 DBI by Tim Bunce L<http://www.tim.bunce.name>.
 
-The original C<DBD::Oracle> was by Tim Bunce. 
+The original C<DBD::Oracle> was by Tim Bunce.
 Maintained as of release 1.17 (February 2006) by John Scoles, then Yanick Champoux, under the
 auspice of the Pythian Group (L<http://www.pythian.com>).