[MDEV-27899] NULL values from JSON NESTED PATH with JSON column Created: 2022-01-30 Updated: 2023-01-04 Resolved: 2023-01-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | JSON, Server |
| Affects Version/s: | 10.8.2, 10.6, 10.7, 10.8 |
| Fix Version/s: | 10.6.12, 10.7.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Francesco Chicchiriccò | Assignee: | Rucha Deodhar |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Docker official image https://hub.docker.com/_/mariadb |
||
| Description |
|
The following SELECT statement:
returns only NULL values for the attrUniqueValue column, even though the value from the plainAttrs column are as follows:
The same exact query run against MySQL 8.0 produces the expected result, e.g. for some rows the uniqueValue column being a JSON column with values:
or
|
| Comments |
| Comment by Elena Stepanova [ 2022-04-08 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
In reality it doesn't return NULL as a result, it returns NULL as an indication of an error. It is clearer when ERROR ON ERROR is used:
In MySQL it works, because they have the logic for JSON column type in a JSON table, but MariaDB doesn't, it treats it the same way as TEXT. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Francesco Chicchiriccò [ 2022-12-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
This issue looks fixed in 10.10.2: can you please confirm? | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Rucha Deodhar [ 2023-01-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Already fixed in 10.6 |