Subject | RE: [Firebird-Java] Database Shutting Down -- Divide By Zero |
---|---|
Author | Robert DiFalco |
Post date | 2003-12-11T01:09:24Z |
I really couldn't find anything like that. Unfortunately, I couldn't
track it down to what query caused the exception because many were going
on. But most if not all were very simple queries.
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Wednesday, December 10, 2003 3:42 PM
To: Firebird-Java@yahoogroups.com
Subject: Re: [Firebird-Java] Database Shutting Down -- Divide By Zero
At 01:41 PM 10/12/2003 -0800, you wrote:
zero. Bear in mind that the behaviour of integer division changed
between
IB 5.6 and IB 6 (and thus Firebird). Any integer/integer division that
results in a value less than 1 will be zero.
e.g. 3/10 will be 0, not 0.33333
but
3.00/10 will be 0.33
So look at your expressions and use a non-integer of sufficiently large
scale for at least one of the operands in division anywhere that a
non-zero
resolution is important. Look at Lester Caine's recent thread in
firebird-support regarding timestamp calculations.
Helen
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
track it down to what query caused the exception because many were going
on. But most if not all were very simple queries.
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Wednesday, December 10, 2003 3:42 PM
To: Firebird-Java@yahoogroups.com
Subject: Re: [Firebird-Java] Database Shutting Down -- Divide By Zero
At 01:41 PM 10/12/2003 -0800, you wrote:
>Can anyone think of anything I could be doing through JayBird thatwould
>cause this to happen?An expression somewhere that causes the denominator to resolve to
>
>DEMOFISH (Server) Wed Dec 10 12:56:43 2003
> Integer divide by zero.
> The code attempted to divide an integer value
> by an integer divisor of zero.
> This exception will cause the Firebird server
> to terminate abnormally.
zero. Bear in mind that the behaviour of integer division changed
between
IB 5.6 and IB 6 (and thus Firebird). Any integer/integer division that
results in a value less than 1 will be zero.
e.g. 3/10 will be 0, not 0.33333
but
3.00/10 will be 0.33
So look at your expressions and use a non-integer of sufficiently large
scale for at least one of the operands in division anywhere that a
non-zero
resolution is important. Look at Lester Caine's recent thread in
firebird-support regarding timestamp calculations.
Helen
>http://docs.yahoo.com/info/terms/
>To unsubscribe from this group, send an email to:
>Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.