[MDEV-29381] JSON paths containing dashes are reported as syntax errors in procedures Created: 2022-08-25 Updated: 2023-08-24 Resolved: 2023-01-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.9.1 |
| Fix Version/s: | 10.9.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Andrei Pavel | Assignee: | Rucha Deodhar |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | regression | ||
| Environment: |
EndeavorOS but with MariaDB 10.9.2 from Dockerhub container |
||
| Attachments: |
|
||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
JSON paths with dashes in them are reported as syntax errors inside procedures. If they are free-standing, they work fine.
This syntax works in procedures on MariaDB 10.8.4 and prior. More about the environment:
Dockerized MariaDB:
But also tested with the client included in the docker container, same result:
|
| Comments |
| Comment by Sergei Golubchik [ 2022-08-25 ] | ||||
|
Caused by
| ||||
| Comment by Francis Dupont [ 2022-11-29 ] | ||||
|
Found the source of the bug: the parser transition table for quoted keys has an incorrect entry (JE_SYN i.e. raise a syntax error vs. stay in the same state) for '-'. I attached a fix (diff on 10.10.2 sources) which solves the problem for me. | ||||
| Comment by Rucha Deodhar [ 2022-12-29 ] | ||||
|
Patch (submitted as contribution) : https://github.com/MariaDB/server/commit/0225159a8d0e1260bfec7219b584523097a74d4b |