[MDEV-16351] JSON_OBJECT() treats hybrid functions with boolean arguments as numbers Created: 2018-05-31  Updated: 2018-05-31  Resolved: 2018-05-31

Status: Closed
Project: MariaDB Server
Component/s: Data types, JSON
Affects Version/s: 10.3, 10.4
Fix Version/s: 10.4.0

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

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed

 Description   

SELECT
  JSON_OBJECT("cond", true) AS j1,
  JSON_OBJECT("cond", COALESCE(true, false)) j2;

+----------------+-------------+
| j1             | j2          |
+----------------+-------------+
| {"cond": true} | {"cond": 1} |
+----------------+-------------+

j2 looks wrong. It should print the value as true, similar to how j1 does.


Generated at Thu Feb 08 08:28:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.