[MDEV-26023] JSON handing of DECIMAL is odd Created: 2021-06-26 Updated: 2022-06-01 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.6.1 |
| Fix Version/s: | 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Anders Karlsson | Assignee: | Rucha Deodhar |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux CentOS 7.7 |
||
| Description |
|
When a DECIMAL value is passed as an argument to create a JSON object, it is handled differently in the generated JSON from, say, a DOUBLE, despite DECIMAL not being a datatype in JSON and is treated like DOUBLE in other cases. In particular, trailing zeros are retained.
Note that the trailing zeros are retained, which is meaningless in JSON, somehow the notion that DOUBLE is different from DECIMAL, which makes sense in SQL, is retained in JSON, where it really doesn't make sense. Also
|