Subject | Re: [Firebird-Java] Database Shutting Down -- Divide By Zero |
---|---|
Author | Helen Borrie |
Post date | 2003-12-10T23:41:41Z |
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
>Can anyone think of anything I could be doing through JayBird that wouldAn expression somewhere that causes the denominator to resolve to
>cause this to happen?
>
>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
>
>To unsubscribe from this group, send an email to:
>Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/