On Fri, Oct 21, 2005 at 04:07:20PM +0100, Tim Bunce wrote: > 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.
Ah, I didn't spot the attached trace. Sorry. OCIStmtExecute(831e534,8323594,831e5a8,0,0,0,0,0)=SUCCESS OCIAttrGet(8323594,OCI_HTYPE_STMT,bfffe906,0,10,831e5a8)=SUCCESS dbd_st_execute SELECT returned (SUCCESS, rpc0, fn4, out0) dbd_st_fetch 2 fields... OCIStmtFetch(8323594,831e5a8,1,2,0)=SUCCESS dbih_setup_fbav for 2 fields => 0x829bfac dbd_st_fetch 2 fields SUCCESS 0 (rc=0): '?.' 1 (rc=0): '51' Sure looks like an Oracle problem. Tim.