Details
Description
When certain JSON expressions are wrapped into a non-recursive CTE, the resulting JSON is broken:
MariaDB [test]> SELECT JSON_SET('{"a": 1}', '$.b', 1) doc;
|
+------------------+
|
| doc |
|
+------------------+
|
| {"a": 1, "b": 1} |
|
+------------------+
|
1 row in set (0.000 sec)
|
 |
MariaDB [test]> WITH js AS (SELECT JSON_SET('{"a": 1}', '$.b', 1) doc) SELECT doc FROM js;
|
+-----------------+
|
| doc |
|
+-----------------+
|
| {"a": 1, "b": 1 |
|
+-----------------+
|
1 row in set (0.000 sec)
|
So far I've only managed to reproduce this with JSON_SET.
Attachments
Issue Links
- is duplicated by
-
MDEV-28591 JSON_SET result truncated in some contexts
- Closed