[MDEV-27488] Make JSON_EXTRACT validate non-existing keys Created: 2022-01-13 Updated: 2023-11-28 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | JSON, Server |
| Fix Version/s: | 10.11 |
| Type: | Task | Priority: | Major |
| Reporter: | Anel Husakovic | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Description |
|
If we don't know the path arguments are valid or not we can not say to what arguments result of above query corresponds to key1 or key2 or key1 or x , or any of 8 combination. If there is a chance to generate NULL as a result per index in path argument, that would be great. |
| Comments |
| Comment by Weijun Huang [ 2023-02-15 ] | |
|
In MySQL 8.0, the result is the same as what MariaDB does now. So your advice is to output
, right? If so, I could try to take it. | |
| Comment by Anel Husakovic [ 2023-02-17 ] | |
|
Yes | |
| Comment by Sergei Golubchik [ 2023-02-17 ] | |
|
json_extract is non standard, it was added for MySQL compatibility. I suppose it must behave as in MySQL. |