LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
52 stars 24 forks source link

[FRG-46] decimal arithmetic does not handle overflow #824

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="schoi", created="Thu, 16 Feb 2006 16:11:55 -0500 (GMT-05:00)"] related to LDB-21, but not sure if a fix for that will automatically fix this too..

With any decimal overflow, there is no exception or warning; the overflow value is just stored and/or returned.

Repro:
------------
create schema s;
set schema 's';

create table t1(a decimal(19,18) primary key);
insert into t1 values(1);

-- below queries should throw exceptions but don't:

select a+10 from t1;

+------------------------+
| EXPR$0 |
+------------------------+
| -7.446744073709551616 |
+------------------------+


insert into t1 values(10);
select * from t1;

+------------------------+
| A |
+------------------------+
| -8.446744073709551616 |
| 1.000000000000000000 |
+------------------------+

dynamobi-build commented 12 years ago

[author="jpham", created="Thu, 16 Feb 2006 17:23:10 -0500 (GMT-05:00)"] Yes, this error is related to the overflow issue.