Bugs item #2853458, was opened at 2009-09-07 10:03
Message generated for change (Comment added) made by nielsnes
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2853458&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: SQL CVS Head
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Stefan de Konink (skinkie)
Assigned to: Niels Nes (nielsnes)
Summary: SQL: cast exceeding maximum value, returns null
Initial Comment:
Should this be prevented? Or is a cast a cast?
>select cast(power(2,63) as bigint);
+----------------------+
| power_single_value |
+======================+
| null |
+----------------------+
1 tuple
sql>select power(2,63);
+------------------------+
| power_single_value |
+========================+
| 9.2233720368547758e+18 |
+------------------------+
1 tuple
----------------------------------------------------------------------
>Comment By: Niels Nes (nielsnes)
Date: 2009-09-17 20:22
Message:
fixed, we now test for nil better.. Added test in overflow.SF-2853458.sql
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2009-09-08 09:41
Message:
The div_by_zero is probably not related "code-wise", but possibly
"conceptually":
Errors like division by zero (in batcalc.mx) or overflows (with arthmetics
in batcalc.mx or casts in batcast.mx) are partly reported as errors, partly
handled by resulting in nil/null, partly simply ignored.
For an efficient SQL implementation/support, we'd probably at least need
two variants of each "bulk" ("multiplex") aritmetic and cast operation in
batcalc.mx and batcast.mx: one that "silently" turns errors and overflows
into nil/null, and one the raises an error/exception.
The SQL compiler then needs to decide which semantics it requires and call
the respective primitive ...
----------------------------------------------------------------------
Comment By: Fabian (mr-meltdown)
Date: 2009-09-08 09:14
Message:
div_by_zero.SF-987304 no longer returns an error but returns NULL instead,
can that be related to this bug?
----------------------------------------------------------------------
Comment By: Niels Nes (nielsnes)
Date: 2009-09-07 20:58
Message:
sql should give an error (ie overflow)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2853458&group_id=56967
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs