[svn:dbd-oracle] r15569 - in dbd-oracle/trunk: . lib/DBD/Oracle/Troubleshooting

[email protected] Wed, 6 Feb 2013 13:10:52 -0800 (PST)
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: yanick
Date: Wed Feb  6 13:10:49 2013
New Revision: 15569

Modified:
   dbd-oracle/trunk/Changes
   dbd-oracle/trunk/META.json
   dbd-oracle/trunk/META.yml
   dbd-oracle/trunk/README
   dbd-oracle/trunk/README.mkdn
   dbd-oracle/trunk/lib/DBD/Oracle/Troubleshooting/Macos.pod

Log:
Update Lion instructions for 64-bit Instant Client.

Modified: dbd-oracle/trunk/Changes
==============================================================================
--- dbd-oracle/trunk/Changes	(original)
+++ dbd-oracle/trunk/Changes	Wed Feb  6 13:10:49 2013
@@ -1,7 +1,6 @@
 Revision history for DBD::Oracle
 
-NEXTVERSION
-
+{{$NEXT}}
   [BUG FIXES]
 
   - fix RT46628 - bind_param_inout ORA_RSET causes MSWin32 access
@@ -17,6 +16,10 @@
     it you'll get undef back instead of a useless statement handle.
     Extended 50cursor.t test to check the above fix.
 
+  [DOCUMENTATION]
+  - Update Lion instructions for 64-bit Instant Client. (GH#37, patch by
+    theory)
+
 1.56      2013-01-08
   - fix t/26exe_array.t in the case of no db connection (RT82506,
     reported by Peter Rabbitson)

Modified: dbd-oracle/trunk/META.json
==============================================================================
--- dbd-oracle/trunk/META.json	(original)
+++ dbd-oracle/trunk/META.json	Wed Feb  6 13:10:49 2013
@@ -7,7 +7,7 @@
       "Martin J. Evans <[email protected]>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 4.300027, CPAN::Meta::Converter version 2.120921",
+   "generated_by" : "Dist::Zilla version 4.300028, CPAN::Meta::Converter version 2.120921",
    "license" : [
       "perl_5"
    ],

Modified: dbd-oracle/trunk/META.yml
==============================================================================
--- dbd-oracle/trunk/META.yml	(original)
+++ dbd-oracle/trunk/META.yml	Wed Feb  6 13:10:49 2013
@@ -20,7 +20,7 @@
   DBI: 1.51
   ExtUtils::MakeMaker: 6.30
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300027, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Dist::Zilla version 4.300028, CPAN::Meta::Converter version 2.120921'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html

Modified: dbd-oracle/trunk/README
==============================================================================
--- dbd-oracle/trunk/README	(original)
+++ dbd-oracle/trunk/README	Wed Feb  6 13:10:49 2013
@@ -3770,6 +3770,16 @@
     too long. This reference remains until the PL/SQL handle is re-bound,
     re-executed or destroyed.
 
+    NOTE: From DBD::Oracle 1.57 functions or procedures returning
+    SYS_REFCURSORs which have not been opened (are still in the initialised
+    state) will return undef for the cursor statement handle e.g., in the
+    example above if the sp_ListEmp function simply returned l_cursor
+    instead of opening it. This means you can have a function/procedure
+    which can elect to open the cursor or not, Before this change if you
+    called a function/procedure which returned a SYS_REFCURSOR which was not
+    opened DBD::Oracle would error in the execute for a OCIAttrGet on the
+    uninitialised cursor.
+
     See the "curref.pl" script in the Oracle.ex directory in the DBD::Oracle
     source distribution for a complete working example.
 

Modified: dbd-oracle/trunk/README.mkdn
==============================================================================
--- dbd-oracle/trunk/README.mkdn	(original)
+++ dbd-oracle/trunk/README.mkdn	Wed Feb  6 13:10:49 2013
@@ -3769,14 +3769,24 @@
     $sth3->bind_param(":cursor", $sth2, { ora_type => ORA_RSET } );
     $sth3->execute;
 
-It is not normally necessary to close a cursor
-explicitly in this way. Oracle will close the cursor automatically
-at the first client-server interaction after the cursor statement handle is
-destroyed. An explicit close may be desirable if the reference to
-the cursor handle from the PL/SQL statement handle delays the destruction
+It is not normally necessary to close a cursor explicitly in this
+way. Oracle will close the cursor automatically at the first
+client-server interaction after the cursor statement handle is
+destroyed. An explicit close may be desirable if the reference to the
+cursor handle from the PL/SQL statement handle delays the destruction
 of the cursor handle for too long. This reference remains until the
 PL/SQL handle is re-bound, re-executed or destroyed.
 
+NOTE: From DBD::Oracle 1.57 functions or procedures returning
+SYS\_REFCURSORs which have not been opened (are still in the
+initialised state) will return undef for the cursor statement handle
+e.g., in the example above if the sp\_ListEmp function simply returned l\_cursor
+instead of opening it. This means you can have a function/procedure
+which can elect to open the cursor or not, Before this change if you called
+a function/procedure which returned a SYS\_REFCURSOR which was not opened
+DBD::Oracle would error in the execute for a OCIAttrGet on the uninitialised
+cursor.
+
 See the `curref.pl` script in the Oracle.ex directory in the DBD::Oracle
 source distribution for a complete working example.
 

Modified: dbd-oracle/trunk/lib/DBD/Oracle/Troubleshooting/Macos.pod
==============================================================================
--- dbd-oracle/trunk/lib/DBD/Oracle/Troubleshooting/Macos.pod	(original)
+++ dbd-oracle/trunk/lib/DBD/Oracle/Troubleshooting/Macos.pod	Wed Feb  6 13:10:49 2013
@@ -66,37 +66,56 @@
 
 =head1 Instructions for 10.7.x (Lion)
 
-Because the 64 bit instantclient (version 10gr2)is currently
-[incompatible with Lion][], DBD::Oracle can only be compiled with the
-32-bit instantclient libraries, and therefore requires 32-bit Perl. If
-your Perl is 64-bit (which, by default, it is on Mac OS X), you will
-not be able to build DBD::Oracle until an updated 64-bit instantclient
-is released.
+Perl on Lion and later is built with 64-bit support, and therefore requires
+the 64-bit Instant Client. As of this writing, only Instant Client 11.2
+(64-bit) actually works. The 64-bit Instant Client 10.2 is L<incompatible with
+Lion|http://only4left.jpiwowar.com/2011/08/instant-client-osx-lion-32-bit-only/>.
+We therefore recommend the 11.2 client. If you must Instant Client 10.2, you
+may need to recompile Perl with 32-bit support.
 
-[incompatible with Lion]: http://only4left.jpiwowar.com/2011/08/instant-client-osx-lion-32-bit-only/
+Either way, setup and configuration is the same:
 
-If you have a 32-bit Perl, however, then the following steps should work:
+=over
 
-* Download and install the 32-bit basic, sqlplus, and sdk instantclient
-libraries and install them in a central location, such as
-`/usr/oracle_instantclient`. [Downloads here][].
+=item *
+
+Download and install the basic, sqlplus, and sdk instantclient libraries and
+install them in a central location, such as F</usr/oracle_instantclient>.
+L<Downloads
+here|http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html>
 
-  [Downloads here]: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
+=item *
 
-* Create a symlink from `libclntsh.dylib.10.1` to `libclntsh.dylib`:
+Create a symlink from F<libclntsh.dylib.10.1> to F<libclntsh.dylib>:
 
-      cd /usr/oracle_instantclient/
-      link -s libclntsh.dylib.10.1 libclntsh.dylib
+  cd /usr/oracle_instantclient/
+  ln -s libclntsh.dylib.* libclntsh.dylib
+  ln -s libocci.dylib.* libocci.dylib
 
-* Update your environment to point to the libraries:
+=item *
 
-      export ORACLE_HOME=/usr/oracle_instantclient
-      export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/oracle_instantclient
+The following directory is hardcoded into the Oracle Instant Client - god
+knows why - so we need to create and symlink it:
+
+  sudo mkdir -p /b/227/rdbms/
+  sudo cd /b/227/rdbms/
+  sudo ln -s /usr/oracle_instantclient/ lib
+
+=item *
 
-* You should now be able to install DBD::Oracle from CPAN:
+Update your environment to point to the libraries:
+
+  export ORACLE_HOME=/usr/oracle_instantclient
+  export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/oracle_instantclient
+
+=item *
+
+You should now be able to install DBD::Oracle from CPAN:
 
      cpan DBD::Oracle
 
+=back
+
 =head1 Instructions for 10.6.x (Snow Leopard)
 
 These are taken from a stackoverflow answer by "nickisfat" who gave