Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5(EOL), 12.3
-
None
Description
Consider this example:
 |
set @json= |
'{
|
"range_scan_alternatives": {
|
"ranges": [ "(1) <= (kp1) <= (1)",
|
"(2) <= (kp1) <= (2)" ],
|
"aaa":"bbb"
|
}
|
}'; |
select json_valid(@json); |
select json_extract(@json, '$**.range_scan_alternatives**.ranges'); |
On MariaDB, it produces:
MariaDB [test]> select json_extract(@json, '$**.range_scan_alternatives**.ranges');
|
+-------------------------------------------------------------+
|
| json_extract(@json, '$**.range_scan_alternatives**.ranges') |
|
+-------------------------------------------------------------+
|
| NULL |
|
+-------------------------------------------------------------+
|
I think the correct result should be what MySQL-8 produces:
mysql> select json_extract(@json, '$**.range_scan_alternatives**.ranges');
|
+-------------------------------------------------------------+
|
| json_extract(@json, '$**.range_scan_alternatives**.ranges') |
|
+-------------------------------------------------------------+
|
| [["(1) <= (kp1) <= (1)", "(2) <= (kp1) <= (2)"]] |
|
+-------------------------------------------------------------+
|
Attachments
Issue Links
- duplicates
-
MDEV-15322 JSON_VALUE and JSON_QUERY don't handle wildcards in path
-
- Confirmed
-
- is duplicated by
-
MDEV-24259 JSON_EXTRACT returns wrong result with **
-
- Confirmed
-