On Thu, Oct 20, 2005 at 03:41:01PM -0500, Scott T. Hildreth wrote:
> To add more info, I was told this problem only occurs if there is only
> one row returned.  If more than one row is returned, the arrayref is 
> fine.  I changed the selectall_arrayref to selectrow_array and the data
> (one row returned) was fine.   I'm posting to dev as well, just in case 
> this is a known bug.

It's not. (And even if it were, dbi-dev isn't meant for reporting bugs.
The dbi-users list is fine for that.)

> I copied the table to a 9i instance and the ran
> the code below, and it worked fine.  So it seems to be related to 10g.

And since the DBD::Oracle code was the same, that implies it's not a
DBD::Oracle bug. Does seem very odd though.

A level 5 trace will show you what Oracle is returning for each field of
each row. If that shows the bad data then it's almost certainly an
Oracle bug. If it doesn't (ie it shows different values being returned
than what eventually gets returned by selectall_arrayref) then it's a
DBD::Oracle or DBI bug - but at the moment I doubt that.

Tim.

> Thu, 2005-10-20 at 14:07 -0500, Scott T. Hildreth wrote:
> > I am going to investigate more, but I thought I would post the question
> > to see if anyone has run into this problem.
> > 
> > I have co-workers that connecting to a remote Oracle DB (10.1), I
> > compiled DBD::Oracle 1.16 with the 10.1 client libraries.  The data
> > returned from a selectall_arrayref is 2 fields a filename and a
> > quantity.  Here is the isolated code,
> > 
> > 286:            my $load_file_ar = $dbh->selectall_arrayref(q{
> > 287                     select FILENAME, NUM_RECORDS
> > 288                       from LOAD_DATA_SRC_FILE
> > 289                      where LOAD_ID = ?
> > 290                        and DATA_UPDATE_ID = ?
> > 291                      order by FILE_ID
> > 292             }, undef, $load_id, $update_id);
> > 
> > $load_id = 19 & $update_id = 51.
> > 
> > ...here is the data returned.
> > 
> >   DB<4> x $files_ar
> > 0  ARRAY(0x8536328)
> >    0  ARRAY(0x85e40e0)
> >       0  (binary data)
> >       1  51
> > 
> > what ever $update_id's value is, this is always returned in the [1] position
> > of the the arrayref and the filename is always binary data.  This works fine
> > with sqlplus.  
> > 
> > I have tried it with Perl 5.8.[167] always the same results.   The database 
> > resides on an Alpha and the clients are on Linux.  Trace doesn't show 
> > anything
> > unusual.  I don't know if this is an NLS-utf8 issue.  Any ideas?
> > 
> >                                 Thanks,
> >                                      STH
> >  
> > Trace- level 9 is attached.
> > 
> -- 
> Scott T. Hildreth <[EMAIL PROTECTED]>

Reply via email to