Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
-
None
Description
_Note: it might be a documentation issue, please then documented it properly. For now, I don't see anything that would suggest this difference in behavior between JSON_VALUE / JSON_QUERY and JSON_EXTRACT
MariaDB [test]> SELECT JSON_EXTRACT('{"foo":{"bar":"qux"}}','$**.bar'); |
+-------------------------------------------------+ |
| JSON_EXTRACT('{"foo":{"bar":"qux"}}','$**.bar') | |
+-------------------------------------------------+ |
| ["qux"] | |
+-------------------------------------------------+ |
1 row in set (0.00 sec) |
MariaDB [test]> SELECT JSON_QUERY('{"foo":{"bar":"qux"}}','$**.bar'); |
+-----------------------------------------------+ |
| JSON_QUERY('{"foo":{"bar":"qux"}}','$**.bar') | |
+-----------------------------------------------+ |
| NULL | |
+-----------------------------------------------+ |
1 row in set (0.00 sec) |
MariaDB [test]> SELECT JSON_VALUE('{"foo":{"bar":"qux"}}','$**.bar'); |
+-----------------------------------------------+ |
| JSON_VALUE('{"foo":{"bar":"qux"}}','$**.bar') | |
+-----------------------------------------------+ |
| NULL | |
+-----------------------------------------------+ |
1 row in set (0.01 sec) |
Given the current description of JSON_VALUE and JSON_QUERY, I would expect one of them to return a non-null value.
Attachments
Issue Links
- relates to
-
MDEV-12131 JSON path as used by MariaDB 10.2 JSON needs documentation
- Open