-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.21.1
-
Component/s: BSON
-
None
Summary
Fetching data decimal data from CLOB looses precision
Environment
son lib 1.21.1
linuxamd64.
gcc 8
How to Reproduce
For a data '{"a": 0.1234567890123456789012345, "b": "0.1234567890123456789012345" } after calling bson_init_from_json
when trying to access 'a ' we are getting 0.12345678901234568. we need full data.
on analysis what we noticed is that the type of the data is BSON_TYPE_DOUBLE so 16 precisions are considered .
is this behaviour expected? is there any way to preserve the full precision. I know decfloat will, do but how can we control the conversion in bson_init_from_json.
Additional Background
Please provide any additional background information that may be helpful in diagnosing the bug.
- duplicates
-
CDRIVER-4725 Fetching data decimal data from CLOB looses precision
- Closed