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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Bug when dividing an INTERVAL

Re: Bug when dividing an INTERVAL

From: Laurenz Albe <invite_at_spam.to.invalid>
Date: 13 Jun 2006 13:34:26 GMT
Message-ID: <1150205655.512026@proxy.dienste.wien.at>


Vladimir M. Zakharychev <bob--nospam--_at_dynamicpsp.com> wrote:

> Bj?rn W?chter wrote:

>> When I create this Procedure in my Oracle
>> 10.1.0.4 Database and execute it I see the
>> strange effect that v_count is changing from
>> 1 to NULL. It only happens when dividing
>> the Interval by 1.
>> Is this Bug known?
>> Do you get the same result?
>> Is the effect the same in 10.2?
>>
>>
>> CREATE OR REPLACE PROCEDURE Sp_Bug_Test
>> AS
>>
>> v_count NUMBER;
>> v_view_periode INTERVAL DAY(9) TO SECOND(6);
>> v_base_span INTERVAL DAY(9) TO SECOND(6);
>> BEGIN
>> v_count := 1;
>> dbms_output.put_line('v_count: ' || v_count);
>>
>> v_base_span := v_view_periode / 1;
>> dbms_output.put_line('v_count: ' || v_count);
>>
>> END Sp_Bug_Test;
> 

>>Aren't your two dbms_output lines identical?
> 
> They are, but their output isn't. Indeed, the first output is 1,
> the second is NULL. Verified on 10.1.0.5. Divide by
> anything else (for example, by 2,) and v_count doesn't
> change. Strange... Looks like a case for Oracle Support.

Definitely.

I tried on a 10.2.0.2.0 server and things are OK (1 is output twice). On a 10.1.0.4.2 server on the same machine the error occurs.

I couldn't find a bug on Metalink that looks like what you describe; the only thing that looked a little bit similar was bug 4375405, but that has to do with exception blocks and is reported fixed in 10.1.0.5.

Yours,
Laurenz Albe Received on Tue Jun 13 2006 - 08:34:26 CDT

Original text of this message

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