[MDEV-22976] CAST(JSON_EXTRACT() AS DECIMAL) does not handle boolean values Created: 2020-06-22  Updated: 2020-07-02  Resolved: 2020-06-22

Status: Closed
Project: MariaDB Server
Component/s: Data types, JSON
Affects Version/s: 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.2.33, 10.3.24, 10.4.14, 10.5.5

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-21445 Strange/inconsistent behavior of IN c... Closed
Relates
relates to MDEV-15905 select json_value('{"b":true}','$.b')... Closed

 Description   

SELECT
  CAST(JSON_EXTRACT('{"x":true}', '$.x') AS DOUBLE) AS cf,
  CAST(JSON_EXTRACT('{"x":true}', '$.x') AS DECIMAL) AS cd;

+------+------+
| cf   | cd   |
+------+------+
|    1 |    0 |
+------+------+
1 row in set, 1 warning (0.012 sec)


Generated at Thu Feb 08 09:18:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.