Re: float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-19 Thread Erwan Lemonnier
Hi all! I have started a thread on perl5-porters discussing the same issue. The posts are not yet archived on http://www.nntp.perl.org/group/perl.perl5.porters/ but should appear there quite soon. What this new thread boils down to (so far) is that perl 5.6 uses the native atof to convert from s

Re: float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-19 Thread Erwan Lemonnier
perl --version This is perl, v5.8.8 built for i486-linux-gnu-thread-multi select * from v$version Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product PL/SQL Release 10.2.0.1.0 - Production CORE10.2.0.1.0 Production TNS for Linux: Version 10.2.0.1.0 - Production NLSRTL Versi

Re: float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-19 Thread Erwan Lemonnier
> Take a look at the source for the Perl_sv_2nv() function in sv.c > in the two distributions. > Also check for differences in the perl config > items that impact that code. Back from a first dive. There are significant differences between 5.6.2 and 5.8.8 with respect to how PVs are translated t

Re: float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-19 Thread Erwan Lemonnier
Hi Tim! Ah, now it's getting interesting! :) So I thought :) Are the two versions of DBD::Oracle built against the same Oracle version/installation? No. The one used by perl 5.6.2 was built against an oracle 9.2.1.0 (unsure of the exact version, but it was a 9.*). The one used by perl 5.8.

Re: float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-19 Thread Erwan Lemonnier
Hi Jonathan, Silly question time - I assume that if you don't includes the DBI->connect line, then the two invocations of showbin produce the same output in both versions of Perl. It does. And in that case, the only float representation obtained is: 0011100010101001011010010001101

Re: float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-18 Thread Erwan Lemonnier
Hello folk! Now I think I got a clean shot at what's troubling me 8-) Consider the following code: --- use strict; use warnings; use DBI; my $ORASID = $ENV{ORACLE_SID}; my $ORAUSR = 'username'; my $ORAPWD = 'password'; sub showbin { print "bin: ".

Re: float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-18 Thread Erwan Lemonnier
Hi again! Thanks Tim for this thorough explanation :) For the record, DBD::Oracle binds parameters and fetches values as strings. Great, now we are getting closer to the heart :) As I wrote in my first post, the problem can be triggered with the following perl test: -

Re: Re: float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-17 Thread Erwan Lemonnier
The discussion started by http://www.nntp.perl.org/group/perl.dbi.users/2007/07/msg31663.html didn't really end with a clear answer, so I wanted to restate the problem more clearly this time, in the light of what was brought under the discussion. The main line: when storing the string '1.73696'

Re: Re: float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-11 Thread Erwan Lemonnier
ge of converting the data representation fetched from oracle into perl's native float (leading to the binary representation you listed above). Would that be DBD::Oracle? or DBI? or perl itself? /Erwan Lemonnier

float bug? perl 5.8, DBI and oracle 10.2.0

2007-07-10 Thread Erwan Lemonnier
s, but when it start converting the PV 1.73696 into an NV, trouble starts. Notice too that it works with most float values. Replace 1.73696 with 1.73697 or 1.73695 and it works. This hints more toward the kind of issues discussed in perlnumber... On the other hand, I get this issue ONLY with numbers