[MDEV-30308] Query using JSON_EXTRACT on a json object containing a nested array returns different result using or not using WHERE Created: 2022-12-27  Updated: 2022-12-28  Resolved: 2022-12-28

Status: Closed
Project: MariaDB Server
Component/s: JSON
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Luca Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: JSON
Environment:

docker image 10.10.2


Issue Links:
Duplicate
duplicates MDEV-30304 Json Range only affects first row of ... Closed
Relates
relates to MDEV-27911 Implement range notation for json path Closed

 Description   

You can see the description on stackoverflow:

https://stackoverflow.com/questions/74910526/mariadb-query-using-json-extract-on-a-json-object-containing-a-nested-array-retu

One comment says that this (probably) bug was introduced in version 10.9 because he tried something similar on dbfiddle.

Thanks in advance



 Comments   
Comment by Alice Sherepa [ 2022-12-28 ]

Thank you for the report!
it is a similar bug to MDEV-30304, the reason is not WHERE, but only the first row is returned correctly. I added a comment there so that the test case would be checked.

Generated at Thu Feb 08 10:15:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.