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

[email protected]
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: byterock
Date: Mon Feb 16 08:57:11 2009
New Revision: 12505

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

Log:
version and a refinement to the 11 OCI_ATTR_DATA_SIZE return 0 bug

Modified: dbd-oracle/trunk/Changes
==============================================================================
--- dbd-oracle/trunk/Changes	(original)
+++ dbd-oracle/trunk/Changes	Mon Feb 16 08:57:11 2009
@@ -1,4 +1,5 @@
 =head1 Changes in DBD-Oracle 1.23(svn rev #####)
+  Fix in case there may be a bug in 11 where the OCI_ATTR_DATA_SIZE my return 0 which should never happen, John scoles
   Fix on the Makefile.PL for a possible sql bug in IC from Martin J. Evans
   Added a change from a suggestion from Martic Evans for making ref cursors faster.
   Added rt.cpan.org Ticket #=42328 ora_objects attribute for extended embedded objects support from Tomas Pokorny

Modified: dbd-oracle/trunk/Oracle.pm
==============================================================================
--- dbd-oracle/trunk/Oracle.pm	(original)
+++ dbd-oracle/trunk/Oracle.pm	Mon Feb 16 08:57:11 2009
@@ -7,7 +7,7 @@
 
 require 5.003;
 
-$DBD::Oracle::VERSION = '1.22';
+$DBD::Oracle::VERSION = '1.23';
 
 my $ORACLE_ENV  = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
 

Modified: dbd-oracle/trunk/oci8.c
==============================================================================
--- dbd-oracle/trunk/oci8.c	(original)
+++ dbd-oracle/trunk/oci8.c	Mon Feb 16 08:57:11 2009
@@ -2701,6 +2701,8 @@
 
 		OCIAttrGet_parmdp(imp_sth, fbh->parmdp, &fbh->dbtype, 0, OCI_ATTR_DATA_TYPE, status);
 		OCIAttrGet_parmdp(imp_sth, fbh->parmdp, &fbh->dbsize, 0, OCI_ATTR_DATA_SIZE, status);
+		/*may be a bug in 11 where the OCI_ATTR_DATA_SIZE my return 0 which should never happen*/
+		/*to fix or kludge for this I added a little code for ORA_VARCHAR2 below */
 
 #ifdef OCI_ATTR_CHAR_USED
 		/* 0 means byte-length semantics, 1 means character-length semantics */
@@ -2735,8 +2737,8 @@
 		/*	the simple types	*/
 			case	ORA_VARCHAR2:				/* VARCHAR2	*/
 
-				if (fbh->dbsize == 0){
-					fbh->dbsize=32;
+				if (fbh->dbsize == 0){  
+					fbh->dbsize=4000;
 				}
 				avg_width = fbh->dbsize / 2;
 		/* FALLTHRU */
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.