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: 10g Bug with Numeric Precision/Scale?

Re: 10g Bug with Numeric Precision/Scale?

From: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 07 Sep 2005 08:34:13 -0700
Message-ID: <1126107202.963821@yasure>


James Carr wrote:
> I've encountered something that I believe is a bug in PL/SQL under 10g
> (at least on 10.1.0.3).
> Here's an example script:
>
> --------
> SET SERVEROUTPUT ON SIZE 1000000
>
> CREATE TABLE MYTABLE (MYCOL NUMBER(12,2));
>
> DECLARE
> PROCEDURE foo(a NUMBER, b MYTABLE.MYCOL%TYPE) IS
> a1 NUMBER(12,2) := a;
> a2 MYTABLE.MYCOL%TYPE := a;
> a3 NUMBER(12,3) := a;
> b1 NUMBER(12,2) := b;
> b2 MYTABLE.MYCOL%TYPE := b;
> b3 NUMBER(12,3) := b;
> BEGIN
> DBMS_OUTPUT.Put_Line(a);
> DBMS_OUTPUT.Put_Line(a1);
> DBMS_OUTPUT.Put_Line(a2);
> DBMS_OUTPUT.Put_Line(a3);
> DBMS_OUTPUT.Put_Line(b);
> DBMS_OUTPUT.Put_Line(b1);
> DBMS_OUTPUT.Put_Line(b2);
> DBMS_OUTPUT.Put_Line(b3);
> END;
> BEGIN
> foo(1.23100007, 1.23100007);
> END;
> /
>
> DROP TABLE MYTABLE;
> --------
>
> The output is as follows on 10.1.0.3.0:
>
> 1.23100007
> 1.23
> 1.23
> 1.231
> 1.23100007
> 1.23100007
> 1.23100007
> 1.231
>
> and on an old 8.1.7.2.0 database (I don't have 9i handy)
>
> 1.23100007
> 1.23
> 1.23
> 1.231
> 1.23100007
> 1.23
> 1.23
> 1.231
>
> Comments?

Patch to 10.1.0.4 and the problem will not exist.

<RANT>
Oracle releases patches for a reason!
</RANT>

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Wed Sep 07 2005 - 10:34:13 CDT

Original text of this message

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