Bug #87360 | -> operator doesn't evaluate expression in JSON path | ||
---|---|---|---|
Submitted: | 9 Aug 2017 14:35 | Modified: | 10 Aug 2017 5:42 |
Reporter: | William Chiquito | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: JSON | Severity: | S4 (Feature request) |
Version: | 5.7.19 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | -> operator, json, json_extract |
[9 Aug 2017 14:35]
William Chiquito
[10 Aug 2017 5:42]
MySQL Verification Team
Hello William, Thank you for the report and test case. Thanks, Umesh
[10 Aug 2017 10:55]
Knut Anders Hatlen
Reclassifying from bug to feature request, since this limitation is as designed. https://dev.mysql.com/worklog/task/?id=8607 - High Level Architecture says: "<expr>" is a string literal containing path expression that's acceptable by JSON_EXTRACT function (see WL#7909). Nothing but string literal is accepted here. Both ' (single quote) and " (double quote) could be used to surround string.
[14 May 2021 21:57]
Justin Levene
In the MYSQL documentation it states JSON_VALUE(json_doc, path) It does not state that "path" can only be a string. The same syntax is also used for JSON_SET, JSON_EXTRACT, all of which do not require only a string but can also accept variables and functions as the path. Is this as intended as the documentation does not support that. In JSON_VALUE it defines path as and does not state it is only a static string: path is a JSON path pointing to a location in the document.
[18 May 2021 9:04]
Knut Anders Hatlen
I've filed bug#103726 to have the documentation updated to mention the current limitations.