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
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
> 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
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.
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
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: ".
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:
-
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'
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
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
10 matches
Mail list logo