|
From: <no...@so...> - 2002-03-15 01:59:46
|
Bugs item #518273, was opened at 2002-02-15 22:30 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=109028&aid=518273&group_id=9028 Category: Core Engine >Group: Fixed v1.0 >Status: Closed >Resolution: Fixed Priority: 9 Submitted By: Claudio Valderrama C. (robocop) Assigned to: Claudio Valderrama C. (robocop) Summary: numeric div in dialect 3 mangles data Initial Comment: Firebird RC2, previous releases, Borland IB, etc. select cast (-70000 as numeric (18,5)) / cast (1.95583 as numeric (18,5)) from rdb$database ===================== 1936.2502338333 select (-4611686018427387904)/-0.5 from rdb$database; ===================== 0.0 Those results are simply impossible. Thanks to Guido Klapperich for reporting the first case. ---------------------------------------------------------------------- >Comment By: Claudio Valderrama C. (robocop) Date: 2002-03-14 21:59 Message: Logged In: YES user_id=62823 After the fix: select cast (-70000 as numeric (18,5)) / cast (1.95583 as numeric (18,5)) from rdb$database; ================= -35790.4316837350 select (-4611686018427387904)/-0.5 from rdb$database; ===================== Statement failed, SQLCODE = -802 arithmetic exception, numeric overflow, or string truncation and the error is the correct behavior there: the result doesn't fit in a signed int64. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=109028&aid=518273&group_id=9028 |