On Thu, 24 Jul 2008 15:38:34 -0400, John Scoles <[EMAIL PROTECTED]>
wrote:

> Well here is is a very large maintenance release of DBD::ORACLE
> 
> You can find it here
> 
> http://svn.perl.org/modules/dbd-oracle/trunk/DBD-Oracle-1.22-RC1.tar

Starting from DBD-Oracle-1.22-11591 from SVN trunk ...

Patches for the low-hanging fruit at the end and attached
#############################################################################
HP-UX 11.23/64 ipf + Oracle 9.2
----
cc -c  -I/pro/oracle/v920/rdbms/public -I/pro/oracle/v920/rdbms/demo 
-I/pro/oracle/v920/rdbms/demo -I/pro/oracle/v920/rdbms/public 
-I/pro/oracle/v920/plsql/public -I/pro/oracle/v920/network/public 
-I/pro/lib/perl5/site_perl/5.8.7/IA64.ARCHREV_0-LP64/auto/DBI -Ae -DDEBUGGING 
+Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/pro/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit   -DVERSION=\"1.22\" 
-DXS_VERSION=\"1.22\" +Z "-I/pro/lib/perl5/5.8.7/IA64.ARCHREV_0-LP64/CORE"  
-DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"9.2.0.7\" Oracle.c
"Oracle.xs", line 252: warning #2009-D: nested comment is not allowed
      /*This will work if the DB goes down, /*
                                            ^
cc -c  -I/pro/oracle/v920/rdbms/public -I/pro/oracle/v920/rdbms/demo 
-I/pro/oracle/v920/rdbms/demo -I/pro/oracle/v920/rdbms/public 
-I/pro/oracle/v920/plsql/public -I/pro/oracle/v920/network/public 
-I/pro/lib/perl5/site_perl/5.8.7/IA64.ARCHREV_0-LP64/auto/DBI -Ae -DDEBUGGING 
+Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/pro/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit   -DVERSION=\"1.22\" 
-DXS_VERSION=\"1.22\" +Z "-I/pro/lib/perl5/5.8.7/IA64.ARCHREV_0-LP64/CORE"  
-DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"9.2.0.7\" dbdimp.c
"dbdimp.c", line 84: warning #2236-D: controlling expression is constant
        && OCIErrorGet_log_stat(errhp, recno, (text*)NULL, &eg_errcode, errbuf,
           ^

"dbdimp.c", line 616: warning #2009-D: nested comment is not allowed
            /* XXX recent oracle docs recommend using OCIEnvCreate() instead of 
*/
            ^

"dbdimp.c", line 690: warning #4212-D: mismatch between character pointer
          types "char *" and "oratext *"
                OCINlsCharSetIdToName(imp_dbh->envhp,charsetname, 
sizeof(charsetname),charsetid );
                                                     ^

"dbdimp.c", line 691: warning #4212-D: mismatch between character pointer
          types "char *" and "oratext *"
                OCINlsCharSetIdToName(imp_dbh->envhp,ncharsetname, 
sizeof(ncharsetname),ncharsetid );
                                                     ^

"dbdimp.c", line 1055: warning #2167-D: argument of type "ub4 *" is
          incompatible with parameter of type "STRLEN *"
    bufp = SvPV(source, len);
           ^

"dbdimp.c", line 285: warning #4275-D: constant out of range ([0 - 4294967295]
          ) for the operator
      Newz(42, fb_ary->abuf,      size * piece_size, ub1);
      ^

"dbdimp.c", line 286: warning #4275-D: constant out of range ([0 - 4294967295]
          ) for the operator
      Newz(42, fb_ary->cb_abuf,   size * max_len, ub1);
      ^

"dbdimp.c", line 287: warning #4275-D: constant out of range ([0 - 4294967295]
          ) for the operator
      Newz(42, fb_ary->aindp,  (unsigned)size,        sb2);
      ^

"dbdimp.c", line 288: warning #4275-D: constant out of range ([0 - 4294967295]
          ) for the operator
      Newz(42, fb_ary->arlen,  (unsigned)size,        ub2);
      ^

"dbdimp.c", line 289: warning #4275-D: constant out of range ([0 - 4294967295]
          ) for the operator
      Newz(42, fb_ary->arcode, (unsigned)size,        ub2);
      ^

"dbdimp.c", line 305: warning #4275-D: constant out of range ([0 - 4294967295]
          ) for the operator
      Newz(42, fb_ary->abuf,   size * bufl, ub1);
      ^

"dbdimp.c", line 306: warning #4275-D: constant out of range ([0 - 4294967295]
          ) for the operator
      Newz(42, fb_ary->aindp,  (unsigned)size,        sb2);
      ^

"dbdimp.c", line 307: warning #4275-D: constant out of range ([0 - 4294967295]
          ) for the operator
      Newz(42, fb_ary->arlen,  (unsigned)size,        ub2);
      ^

"dbdimp.c", line 308: warning #4275-D: constant out of range ([0 - 4294967295]
          ) for the operator
      Newz(42, fb_ary->arcode, (unsigned)size,        ub2);
      ^

cc -c  -I/pro/oracle/v920/rdbms/public -I/pro/oracle/v920/rdbms/demo 
-I/pro/oracle/v920/rdbms/demo -I/pro/oracle/v920/rdbms/public 
-I/pro/oracle/v920/plsql/public -I/pro/oracle/v920/network/public 
-I/pro/lib/perl5/site_perl/5.8.7/IA64.ARCHREV_0-LP64/auto/DBI -Ae -DDEBUGGING 
+Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/pro/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit   -DVERSION=\"1.22\" 
-DXS_VERSION=\"1.22\" +Z "-I/pro/lib/perl5/5.8.7/IA64.ARCHREV_0-LP64/CORE"  
-DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"9.2.0.7\" oci8.c
"oci8.c", line 202: error #2020: identifier "OCI_BIND_SOFT" is undefined
                case OCI_BIND_SOFT:     return "BIND_SOFT";               /* 
soft bind or define */
                     ^

"oci8.c", line 203: error #2020: identifier "OCI_DEFINE_SOFT" is undefined
                case OCI_DEFINE_SOFT:   return "DEFINE_SOFT";           /* soft 
bind or define */
                     ^

"oci8.c", line 245: error #2020: identifier "OCI_MUTEX_TRY" is undefined
                case OCI_MUTEX_TRY:                return "MUTEX_TRY";    /* 
try and acquire mutex */
                     ^

"oci8.c", line 246: error #2020: identifier "OCI_NCHAR_LITERAL_REPLACE_ON" is
          undefined
                case OCI_NCHAR_LITERAL_REPLACE_ON: return 
"NCHAR_LITERAL_REPLACE_ON"; /* nchar literal replace on */
                     ^

"oci8.c", line 247: error #2020: identifier "OCI_NCHAR_LITERAL_REPLACE_OFF" is
          undefined
                case OCI_NCHAR_LITERAL_REPLACE_OFF:return 
"NCHAR_LITERAL_REPLACE_OFF"; /* nchar literal replace off*/
                     ^

"oci8.c", line 393: warning #2236-D: controlling expression is constant
        && OCIErrorGet_log_stat(errhp, recno, (text*)NULL, &eg_errcode, errbuf,
           ^

"oci8.c", line 1660: warning #2167-D: argument of type "ub4 *" is incompatible
          with parameter of type "size_t *"
                                                                &str_len,
                                                                ^

"oci8.c", line 2085: warning #2009-D: nested comment is not allowed
                /**(fb_ary->cb_abuf+(actual_bufl))='\0'; /* add a null teminator
                                                         ^

"oci8.c", line 3409: warning #2167-D: argument of type "STRLEN *" is
          incompatible with parameter of type "ub4 *"
                          &tablename, &tablename_len, OCI_ATTR_NAME, errhp, 
status);
                                      ^

"oci8.c", line 1247: warning #4275-D: constant out of range ([0 - 4294967295])
          for the operator
        New(42, buffer, buflen, ub1);
        ^

"oci8.c", line 2374: warning #4275-D: constant out of range ([0 - 4294967295])
          for the operator
                Newz(1, obj->fields, (unsigned) obj->field_count, fbh_obj_t);
                ^

"oci8.c", line 2572: warning #4275-D: constant out of range ([0 - 4294967295])
          for the operator
      Newz(42, imp_sth->fbh, num_fields, imp_fbh_t);
      ^

5 errors detected in the compilation of "oci8.c".

With the patches applied:

> make test
PERL_DL_NONLAZY=1 /pro/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/01base................# Test loading DBI, DBD::Oracle and version
t/01base................ok
t/10general.............ok
t/12impdata.............ok
t/14threads.............skipped: this hpux perl 5.008007 not configured to 
support iThreads
t/15nls.................ok
t/20select..............ok
t/21nchar...............ok
t/22nchar_al32utf8......ok
t/22nchar_utf8..........ok
t/23wide_db.............skipped: Database character set is not Unicode
t/23wide_db_8bit........skipped: Database character set is not Unicode
t/23wide_db_al32utf8....skipped: Database character set is not Unicode
t/24implicit_utf8.......ok
t/25plsql...............ok
t/26exe_array...........ok
t/28array_bind..........ok
t/30long................ok
t/31lob.................ok
t/31lob_extended........ok
t/32xmltype.............ok
t/34pres_lobs...........ok
t/40ph_type.............1/19  Placeholder behaviour for ora_type=1 VARCHAR2 
(the default) varies with Oracle version.
 Oracle 7 didn't strip trailing spaces, Oracle 8 did, until 9.2.x
 Your system doesn't. If that seems odd, let us know.
t/40ph_type.............ok
t/50cursor..............ok
t/51scroll..............ok
t/55nested..............ok
t/56embbeded............ok
t/60reauth..............skipped: ORACLE_USERID_2 not defined.
t/70meta................ok
t/80ora_charset.........1/14



t/80ora_charset......... Dubious, test returned 4 (wstat 1024, 0x400)
 Failed 4/14 subtests

Test Summary Report
-------------------
t/80ora_charset     (Wstat: 1024 Tests: 14 Failed: 4)
  Failed tests:  9-10, 13-14
  Non-zero exit status: 4
Files=29, Tests=2062, 52 wallclock secs ( 0.79 usr  0.14 sys +  9.98 cusr  2.08 
csys = 12.99 CPU)
Result: FAIL
Failed 1/29 test programs. 4/2062 subtests failed.

#############################################################################
HP-UX 11.23/64 ipf + Oracle 10.2
----
> make test
PERL_DL_NONLAZY=1 /pro/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/01base................# Test loading DBI, DBD::Oracle and version
t/01base................ok
t/10general.............ok
t/12impdata.............ok
t/14threads.............skipped: this hpux perl 5.008007 not configured to 
support iThreads
t/15nls.................ok
t/20select..............ok
t/21nchar...............ok
t/22nchar_al32utf8......ok
t/22nchar_utf8..........ok
t/23wide_db.............skipped: Database character set is not Unicode
t/23wide_db_8bit........skipped: Database character set is not Unicode
t/23wide_db_al32utf8....skipped: Database character set is not Unicode
t/24implicit_utf8.......ok
t/25plsql...............ok
t/26exe_array...........ok
t/28array_bind..........ok
t/30long................ok
t/31lob.................ok
t/31lob_extended........ok
t/32xmltype.............ok
t/34pres_lobs...........ok
t/40ph_type.............1/19  Placeholder behaviour for ora_type=1 VARCHAR2 
(the default) varies with Oracle version.
 Oracle 7 didn't strip trailing spaces, Oracle 8 did, until 9.2.x
 Your system doesn't. If that seems odd, let us know.
t/40ph_type.............ok
t/50cursor..............ok
t/51scroll..............ok
t/55nested..............ok
t/56embbeded............ok
t/60reauth..............skipped: ORACLE_USERID_2 not defined.
t/70meta................ok
t/80ora_charset.........1/14



t/80ora_charset......... Dubious, test returned 4 (wstat 1024, 0x400)
 Failed 4/14 subtests

Test Summary Report
-------------------
t/80ora_charset     (Wstat: 1024 Tests: 14 Failed: 4)
  Failed tests:  9-10, 13-14
  Non-zero exit status: 4
Files=29, Tests=2062, 39 wallclock secs ( 0.81 usr  0.19 sys + 12.93 cusr  3.06 
csys = 16.99 CPU)
Result: FAIL
Failed 1/29 test programs. 4/2062 subtests failed.
make: *** [test_dynamic] Error 4


> perl -Iblib/{lib,arch} t/80ora_charset.t
1..14
ok 1 - prepared: insert into dbd_ora__drop_me ( idx, ch, nch, descr, dt ) 
values( ?, ?, ?, ?, sysdate )
ok 2 - bind_param idx
ok 3 - bind_param ch withOUT attribute ora_csform
ok 4 - bind_param nch
ok 5 - bind_param descr withOUT attribute ora_csform
ok 6 - insert row 1: DEGREE SIGN
ok 7
ok 8
not ok 9 - match char
not ok 10 - match char
ok 11
ok 12
not ok 13 - match char
not ok 14 - match char
Exit 4




--8<--- patches.diff
--- Oracle.xs.org       2008-07-28 14:50:54 +0200
+++ Oracle.xs   2008-07-28 14:50:59 +0200
@@ -249,7 +249,7 @@ ora_ping(dbh)
        CODE:
        /*simply does a call to OCIServerVersion which should make 1 round 
trip*/
     /*later I will replace this with the actual OCIPing command*/
-    /*This will work if the DB goes down, /*
+    /*This will work if the DB goes down, */
     /*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*/
        {
--- dbdimp.c.org        2008-07-28 14:53:48 +0200
+++ dbdimp.c    2008-07-28 14:53:58 +0200
@@ -611,10 +611,10 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_db
             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 */
+#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);


--- oci8.c.org  2008-07-28 15:05:32 +0200
+++ oci8.c      2008-07-28 15:09:17 +0200
@@ -197,10 +197,12 @@ oci_bind_options(ub4 options)
        /*------------------------Bind and Define 
Options----------------------------*/
                case OCI_DEFAULT:       return "DEFAULT";
                case OCI_SB2_IND_PTR:   return "SB2_IND_PTR";                   
       /* unused */
-               case OCI_DATA_AT_EXEC:  return "DATA_AT_EXEC";             /* 
data at execute time */
-               case OCI_PIECEWISE:     return "PIECEWISE";         /* 
piecewise DMLs or fetch */
-               case OCI_BIND_SOFT:     return "BIND_SOFT";               /* 
soft bind or define */
-               case OCI_DEFINE_SOFT:   return "DEFINE_SOFT";           /* soft 
bind or define */
+               case OCI_DATA_AT_EXEC:  return "DATA_AT_EXEC";  /* data at 
execute time */
+               case OCI_PIECEWISE:     return "PIECEWISE";     /* piecewise 
DMLs or fetch */
+#ifdef OCI_BIND_SOFT   /* new in Ora 10 */
+               case OCI_BIND_SOFT:     return "BIND_SOFT";     /* soft bind or 
define */
+               case OCI_DEFINE_SOFT:   return "DEFINE_SOFT";   /* soft bind or 
define */
+#endif
 /*             case OCI_IOV:                   return "";   11g only release 
1.23 me thinks For scatter gather bind/define */

         }
@@ -242,9 +244,11 @@ oci_mode(ub4  mode)
 /*             case OCI_SUPPRESS_NLS_VALIDATION:  return 
"SUPPRESS_NLS_VALIDATION";   suppress nls validation*/
                                                                                
                         /*       nls validation suppression is on by default;*/
                                                                                
                          /*   use OCI_ENABLE_NLS_VALIDATION to disable it */
+#ifdef OCI_MUTEX_TRY   /* new in Ora 10 */
                case OCI_MUTEX_TRY:                return "MUTEX_TRY";    /* 
try and acquire mutex */
                case OCI_NCHAR_LITERAL_REPLACE_ON: return 
"NCHAR_LITERAL_REPLACE_ON"; /* nchar literal replace on */
                case OCI_NCHAR_LITERAL_REPLACE_OFF:return 
"NCHAR_LITERAL_REPLACE_OFF"; /* nchar literal replace off*/
+#endif
 /*             case OCI_ENABLE_NLS_VALIDATION:    return 
"ENABLE_NLS_VALIDATION";     enable nls validation */
                /*------------------------OCIConnectionpoolCreate 
Modes----------------------*/
                case OCI_CPOOL_REINITIALIZE:    return "CPOOL_REINITIALIZE";
-->8---

-- 
H.Merijn Brand          Amsterdam Perl Mongers  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
diff -pur DBD-Oracle-1.22-11591/Oracle.xs DBD-Oracle-1.22-11591a/Oracle.xs
--- DBD-Oracle-1.22-11591/Oracle.xs	2008-07-22 19:48:35 +0200
+++ DBD-Oracle-1.22-11591a/Oracle.xs	2008-07-28 14:50:59 +0200
@@ -249,7 +249,7 @@ ora_ping(dbh)
 	CODE:
 	/*simply does a call to OCIServerVersion which should make 1 round trip*/
     /*later I will replace this with the actual OCIPing command*/
-    /*This will work if the DB goes down, /*
+    /*This will work if the DB goes down, */
     /*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*/
 	{
diff -pur DBD-Oracle-1.22-11591/dbdimp.c DBD-Oracle-1.22-11591a/dbdimp.c
--- DBD-Oracle-1.22-11591/dbdimp.c	2008-07-24 21:20:19 +0200
+++ DBD-Oracle-1.22-11591a/dbdimp.c	2008-07-28 14:53:58 +0200
@@ -611,10 +611,10 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_db
             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 */
+#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);
 	    
 	    
diff -pur DBD-Oracle-1.22-11591/oci8.c DBD-Oracle-1.22-11591a/oci8.c
--- DBD-Oracle-1.22-11591/oci8.c	2008-07-25 18:48:47 +0200
+++ DBD-Oracle-1.22-11591a/oci8.c	2008-07-28 15:09:17 +0200
@@ -197,10 +197,12 @@ oci_bind_options(ub4 options)
 	/*------------------------Bind and Define Options----------------------------*/
 		case OCI_DEFAULT:   	return "DEFAULT";
 		case OCI_SB2_IND_PTR:   return "SB2_IND_PTR";                          /* unused */
-		case OCI_DATA_AT_EXEC:  return "DATA_AT_EXEC";             /* data at execute time */
-		case OCI_PIECEWISE:   	return "PIECEWISE";         /* piecewise DMLs or fetch */
-		case OCI_BIND_SOFT:   	return "BIND_SOFT";               /* soft bind or define */
-		case OCI_DEFINE_SOFT:   return "DEFINE_SOFT";           /* soft bind or define */
+		case OCI_DATA_AT_EXEC:  return "DATA_AT_EXEC";	/* data at execute time */
+		case OCI_PIECEWISE:   	return "PIECEWISE";	/* piecewise DMLs or fetch */
+#ifdef OCI_BIND_SOFT	/* new in Ora 10 */
+		case OCI_BIND_SOFT:   	return "BIND_SOFT";	/* soft bind or define */
+		case OCI_DEFINE_SOFT:   return "DEFINE_SOFT";	/* soft bind or define */
+#endif
 /*		case OCI_IOV:   		return "";   11g only release 1.23 me thinks For scatter gather bind/define */
 
 	 }
@@ -242,9 +244,11 @@ oci_mode(ub4  mode)
 /*		case OCI_SUPPRESS_NLS_VALIDATION:  return "SUPPRESS_NLS_VALIDATION";   suppress nls validation*/
 													 /* 	  nls validation suppression is on by default;*/
 													  /*   use OCI_ENABLE_NLS_VALIDATION to disable it */
+#ifdef OCI_MUTEX_TRY	/* new in Ora 10 */
 		case OCI_MUTEX_TRY:                return "MUTEX_TRY";    /* try and acquire mutex */
 		case OCI_NCHAR_LITERAL_REPLACE_ON: return "NCHAR_LITERAL_REPLACE_ON"; /* nchar literal replace on */
 		case OCI_NCHAR_LITERAL_REPLACE_OFF:return "NCHAR_LITERAL_REPLACE_OFF"; /* nchar literal replace off*/
+#endif
 /*		case OCI_ENABLE_NLS_VALIDATION:    return "ENABLE_NLS_VALIDATION";     enable nls validation */
 		/*------------------------OCIConnectionpoolCreate Modes----------------------*/
 		case OCI_CPOOL_REINITIALIZE:	return "CPOOL_REINITIALIZE";

Reply via email to