[MDEV-21891] json_search returns incorrect result when keys contain dots Created: 2020-03-08 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.2.22, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Moshe Dolev | Assignee: | Rucha Deodhar |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The query:
returns this:
But when you try:
you get NULL. Correct answer for the json_search query, would be:
Tested on 10.2.22 OS: centos 7 |
| Comments |
| Comment by Elena Stepanova [ 2020-04-05 ] | |||||||||||||||||
|
I am not sure whether it should return a value according to (often vague) JSON standards, but at least the behavior is clearly inconsistent. MySQL 5.7, in comparison, already returns NULL on json_search, and complains about an invalid path on json_extract.
|