Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numeric column stores wrong values after adding large numbers #6192

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Numeric column stores wrong values after adding large numbers #6192

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2017-01-24 10:13:57 +0100
From: @rkoopmanschap
To: SQL devs <>
Version: 11.23.13 (Jun2016-SP2)

Last updated: 2017-03-03 10:24:35 +0100

Comment 24907

Date: 2017-01-24 10:13:57 +0100
From: @rkoopmanschap

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Build Identifier:

After inserting a number that is too large for a numeric table any number that is added to the column is different than the number stored.

Reproducible: Always

Steps to Reproduce:

Run the following in an mclient:

CREATE TABLE test_table4 (d NUMERIC(12,2));
INSERT INTO test_table4 VALUES (531421754532.553234531231250);
INSERT INTO test_table4 VALUES (531421754532);
INSERT INTO test_table4 VALUES (531421754);
INSERT INTO test_table4 VALUES (53142175);
INSERT INTO test_table4 VALUES (53142);
SELECT * FROM test_table4;

Actual Results:

+----------------+
| d |
+================+
| 710.43 |
| 709.88 |
| 7950.72 |
| -2894.68 |
| -2198.23 |
+----------------+

Expected Results:

+----------------+
| d |
+================+
| 531421754.00 |
| 53142175.00 |
| 53142.00 |
+----------------+

Comment 24908

Date: 2017-01-24 14:27:51 +0100
From: MonetDB Mercurial Repository <>

Changeset 542cea1b704c made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=542cea1b704c

Changeset description:

Use the correct type for the to-be-casted value.
This fixes bug #6192.

Comment 24909

Date: 2017-01-24 14:59:35 +0100
From: MonetDB Mercurial Repository <>

Changeset 48aa64261885 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=48aa64261885

Changeset description:

Test for bug #6192.

Comment 25121

Date: 2017-03-03 10:24:35 +0100
From: @sjoerdmullender

Dec2016-SP2 has been released, incorporating the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants