1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-28071: JSON_EXISTS returns always 1 if it is used range notation for

json path
Analysis: When searching for the given path in json string, if the current
step is of array range type, then path was considered reached which meant
path exists. So output was always true. The end indexes of range were not
evaluated.
Fix: If the current step type for a path is array range, then check if the
value array_counter[] is in range of n_item and n_item_end. If it is, then
path exists. Only then return true. If the range criteria is never met
then return false.
This commit is contained in:
Rucha Deodhar
2022-03-21 21:19:10 +05:30
parent e6511a39f8
commit 95a9078efc
3 changed files with 1566 additions and 8 deletions

File diff suppressed because it is too large Load Diff