Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Building DBD::Oracle on Solaris and 9i 64-bit

Re: Building DBD::Oracle on Solaris and 9i 64-bit

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Wed, 11 Jun 2003 22:17:31 +0100
Message-ID: <3k6fevsos05idhl6683c2prek7rmu2a4fp@4ax.com>


On Wed, 11 Jun 2003 14:02:29 -0700, Big Chuck <ccarson_at_echeeba.com> wrote:

>>>> t/ph_type....ok 11/19 expected 'trailing' but got 'trailing ' for
>>>> VARCHAR2
>>>> t/ph_type....FAILED test 12
>>>
>>> It appears that Oracle have changed the behaviour regarding stripping of
>>> trailing spaces from VARCHAR2 bind variables in 9.2's OCI - I don't
>>> think
>>> there was absolute agreement on this issue yet, but there are some Oracle
>>> bugs on listed on Metalink relating to similar issues.
>>
>> You mean trailing white space in the actual row data? ie: If I inserted
>> "smith " into a varchar2 field?

 Yes.

>Also, is that an Oracle bug, a DBI/DBD bug, or is it merely because the
>OCI changed between releases and DBI/DBD has not caught up yet?

 It _looks_ like an Oracle bug, since the behaviour has changed with the same code between 8.1.7 and 9.2.0 (the test passes on 8.1.7 but not on 9.2.0) and the documentation hasn't changed.

 See:
http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96584/oci03typ.htm#421827

 ... which states that trailing space is stripped from VARCHAR2 binds. In 8.1.7 'smith ' would end up as 'smith', whereas in 9.2 it appears the stripping is not taking place and it is stored as 'smith '.

 A related Oracle bug may be 2886004, but it's talking about control characters other than spaces. Whilst this doesn't explain this issue, it shows there's been some messing around with the stripping code in 9.2.

 Could well be a DBD bug, as I said earlier I don't think there's been absolute agreement yet, but it's odd that the same code gives different results.

--
Andy Hassall (andy_at_andyh.co.uk)
Received on Wed Jun 11 2003 - 16:17:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US