Re: DBD::Oracle and $sth->{PRECISION}
- From: dbi-users@xxxxxxxxx (Eric Lenio)
- Date: Thu, 13 Oct 2005 12:57:52 -0400
On Thu, Oct 13, 2005 at 05:34:15PM +0100, Tim Bunce wrote:
> On Thu, Oct 13, 2005 at 10:03:39AM -0400, Eric Lenio wrote:
> > On Thu, Oct 13, 2005 at 09:32:33AM +0100, Tim Bunce wrote:
> > > On Thu, Oct 13, 2005 at 01:15:21AM -0400, Eric Lenio wrote:
> > > > Hi,
> > > >
> > > > In perl 5.8.3, DBD::Oracle 1.14, DBI 1.47 I get expected values when I look at
> > > > $sth->{PRECISION} to retrieve the lengths of varchar2 columns for a given
> > > > table.
> > > >
> > > > I'm now testing perl 5.8.7, DBD::Oracle 1.16, and DBI 1.48 and with the same
> > > > table the values in $sth->{PRECISION} for varchar2's are all quadruple what
> > > > they are above. Can anyone shed any light on what might cause this? It seems
> > > > to affect all tables.
> > >
> > > Probably due to character set related changes in recent releases.
> > >
> > > The best thing to do would be to add some tests to one of the test files
> > > (t/*.t) that demonstrates the problem. Pick a file to change (ie t/20select.t),
> > > copy it (t/20select.t.orig), add the new test, check it fails (make test),
> > > then post the output of "diff -u t/20select.t.orig t/20select.t".
> > >
> > > Please also post the two lines of client and server character set
> > > details output by make test.
> >
> > Diff file is attached. Basically I added a test to check the PRECISION
> > of the 2nd column in the test table, which I believe is supposed to be 10.
>
> Nice and simple. Thanks.
>
> > With this new test I get this during 'make test':
> >
> > t/20select..............# failed test 12 at line 109.
> > # failed test 24 at line 109.
> > # failed test 36 at line 109.
> > FAILED tests 12, 24, 36-38
> > Failed 5/35 tests, 85.71% okay
> > t/21nchar............... Database and client versions and character sets:
> > Database 9.2.0.3.0 CHAR set is AL32UTF8 (Unicode), NCHAR set is UTF8 (Unicode)
> > Client 9.2.0.3 NLS_LANG is 'AMERICAN_AMERICA.AL32UTF8', NLS_NCHAR is '<unset>'
> >
> > FYI I have another Oracle instance on the same machine which if I use this
> > instance instead of the original one used above the tests all pass.
>
> What client and server character set details are output by make test
> for that instance?
Here is the char set details for the instance that passes the tests:
t/21nchar............... Database and client versions and character sets:
Database 9.2.0.3.0 CHAR set is WE8ISO8859P1 (Non-Unicode), NCHAR set is AL16UTF16 (Unicode)
Client 9.2.0.3 NLS_LANG is 'AMERICAN_AMERICA.AL32UTF8', NLS_NCHAR is '<unset>'
This has triggered something in my mind where one time before I had a character
set problem in Oracle and I had to re-run some SQL inside $ORACLE_HOME to fix this,
just can't quite remember. I'll search metalink.oracle.com now.
.
- Follow-Ups:
- Re: DBD::Oracle and $sth->{PRECISION}
- From: Tim Bunce
- Re: DBD::Oracle and $sth->{PRECISION}
- References:
- DBD::Oracle and $sth->{PRECISION}
- From: Eric Lenio
- Re: DBD::Oracle and $sth->{PRECISION}
- From: Tim Bunce
- Re: DBD::Oracle and $sth->{PRECISION}
- From: Eric Lenio
- Re: DBD::Oracle and $sth->{PRECISION}
- From: Tim Bunce
- DBD::Oracle and $sth->{PRECISION}
- Prev by Date: Re: Execute failed: ORA-01026: multiple buffers of size > 4000 in the bind list (DBD: oexec error) - update
- Next by Date: DBD::DBM and hashrefs
- Previous by thread: Re: DBD::Oracle and $sth->{PRECISION}
- Next by thread: Re: DBD::Oracle and $sth->{PRECISION}
- Index(es):
Relevant Pages
|