[MDEV-24573] JSON Path evaluation is not standard-compliant Created: 2021-01-11 Updated: 2023-11-28 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Rucha Deodhar |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | upstream-8.0 | ||
| Description |
|
I am using an example from the publicly available portion of the SQL Standard Get this document open it at page 70 (section 6.10.1 Member accessor), and read:
and then Table 35 shows that the result is "cell", "home". The "context item" here obviously misses quotes around names of the members. I added them and I try the example on MariaDB 10.5.9:
If I add an array accessor step (which makes array unwrapping unnecessary), I get the expected result:
|
| Comments |
| Comment by Sergei Petrunia [ 2021-01-11 ] | |||||||||||||||
|
PostgreSQL 13.0 works according to the standard:
| |||||||||||||||
| Comment by Sergei Petrunia [ 2021-01-11 ] | |||||||||||||||
|
MySQL 8.0.22-13 (I am using Percona Server but I think there's no difference) also produces wrong result:
| |||||||||||||||
| Comment by Sergei Petrunia [ 2021-01-11 ] | |||||||||||||||
|
MS SQL Server 2019: produces NULL value (like MariaDB and MySQL) https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=a75b0e6a08e666102fdbd9cb8678b963
| |||||||||||||||
| Comment by Sergei Petrunia [ 2021-01-12 ] | |||||||||||||||
|
Filed http://bugs.mysql.com/102233 against MySQL. |