On 22/04/10 14:54, Charles Jardine wrote:
> On 21/04/10 18:56, Everett, Timothy S wrote:
>> Thank you for the patch.  This fixed the ORA-24334 problem.
> 
> Thank you very much for testing the patch. I will try to ensure that
> a similar fix gets into the next release of DBD::Oracle.
> 
>> The test suite now runs to completion.  FYI it still complains about one
>> subtest in 58object.t.
> 
> I would be very grateful if you could help me get to the bottom of this
> problem as well. I have attached a modified version of t/58object.t.
> Could you possibly run this and send the output to me. (It will
> be tracing at level 9 - I don't think we need to bother the list
> with the output.)

On 22/04/10 19:16, Everett, Timothy S wrote:
> Charles,
> 
> Thanks again for your help.  I ran your updated 58object.t and attached
> the output.

Thank you for the trace. It looks line another bug revealed buy using
big endian hardware. I attach another patch, which I think will
fix the problem. This patch is independent of the previous one, since
it patches a different source file.

I will again be grateful if you can report back on this patch.

> FYI, 58object.t appears to be the only file formatted as DOS text
> (explicit ^M at the end of every record).   I've run the tests with the
> original file and after removing the carriage returns.  It doesn't
> affect the test results.

I will mention this to John Scoles, the maintainer of DBD::Oracle,
when I report the problems you have found.
 
-- 
Charles Jardine - Computing Service, University of Cambridge
c...@cam.ac.uk    Tel: +44 1223 334506, Fax: +44 1223 334679

diff -r -u DBD-Oracle-1.24/oci8.c DBD-Oracle-1.24.patched/oci8.c
--- DBD-Oracle-1.24/oci8.c      2010-01-28 15:27:54.000000000 +0000
+++ DBD-Oracle-1.24.patched/oci8.c      2010-04-23 11:34:34.013185166 +0100
@@ -2034,6 +2034,7 @@
        text            str_buf[200];
        double          dnum;
        size_t          str_len;
+       ub4             ub4_str_len;
        OCIRaw          *raw    = (OCIRaw *) 0;
        OCIString       *vs     = (OCIString *) 0;
        ub1                     *temp   = (ub1 *)0;
@@ -2057,7 +2058,7 @@
                                                                
fbh->imp_sth->errhp,
                                                                attr_value,
                                                                str_buf,
-                                                               200,
+                                                               (size_t)200,
                                                                &str_len,
                                                        status);
                str_buf[str_len+1] = '\0';
@@ -2069,9 +2070,9 @@
        case OCI_TYPECODE_TIMESTAMP :
 
 
-               str_len = 200;
+               ub4_str_len = 200;
                OCIDateTimeToText_log_stat(fbh->imp_sth->envhp,
-                                                                       
fbh->imp_sth->errhp,attr_value,&str_len,str_buf,status);
+                                                                       
fbh->imp_sth->errhp,attr_value,&ub4_str_len,str_buf,status);
 
                if (typecode == OCI_TYPECODE_TIMESTAMP_TZ || typecode == 
OCI_TYPECODE_TIMESTAMP_LTZ){
                        char s_tz_hour[3]="000";
@@ -2093,19 +2094,19 @@
                        sprintf(s_tz_min,":%02d", tz_minute);
                        strcat((signed char*)str_buf, s_tz_hour);
                        strcat((signed char*)str_buf, s_tz_min);
-                       str_buf[str_len+7] = '\0';
+                       str_buf[ub4_str_len+7] = '\0';
 
                } else {
-                 str_buf[str_len+1] = '\0';
+                 str_buf[ub4_str_len+1] = '\0';
                }
 
                av_push(list, newSVpv( (char *) str_buf,0));
                break;
 
        case OCI_TYPECODE_DATE :                                                
 /* fixed length string*/
-               str_len = 200;
-               OCIDateToText_log_stat(fbh->imp_sth->errhp, (CONST OCIDate *) 
attr_value,&str_len,str_buf,status);
-               str_buf[str_len+1] = '\0';
+               ub4_str_len = 200;
+               OCIDateToText_log_stat(fbh->imp_sth->errhp, (CONST OCIDate *) 
attr_value,&ub4_str_len,str_buf,status);
+               str_buf[ub4_str_len+1] = '\0';
                av_push(list, newSVpv( (char *) str_buf,0));
                break;
 

Reply via email to