Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2, 10.3, 10.4, 10.5
-
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)"]] |
|
+-------------------------------------------------------------+
|