mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-32287: JSON_EXTRACT not returning multiple values for same path
Analysis: When scanning json and getting the exact path at each step, if a path is reached, we end up adding the item in the result and immediately get the next item which results in current path changing. Fix: Instead of immediately returning the item, count the occurences of the path in argument and append in the result as needed.
This commit is contained in:
@ -1115,6 +1115,14 @@ set names latin1;
|
||||
select json_arrayagg('ä'), json_objectagg(1, 'ä');
|
||||
--enable_service_connection
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32287: JSON_EXTRACT not returning multiple values for same path
|
||||
--echo #
|
||||
|
||||
select JSON_EXTRACT("[1, 2, [30, 40]]", '$[2][1]', '$[2][1]');
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31402: SIGSEGV in json_get_path_next | Item_func_json_extract::read_json
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user