[MDEV-32219] Shift/reduce grammar conflict: GRANT .. ON FUNCTION Created: 2023-09-21 Updated: 2023-09-21 Resolved: 2023-09-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 10.6, 10.7, 10.8, 10.9, 10.11, 11.0, 11.1, 11.2, 11.3 |
| Fix Version/s: | 11.3.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The grammar in sql_yacc.yy is conflicting in the grant_privileges rule.
So the sequence "ON FUNCTION" is ambiguous:
It can either be a ON FUNCTION or "ON TABLE function" with Here's the bison -rall output:
The same problem is also reported in the REVOKE grammar. The opt_table rule should be resolve using %prec. It's empty branch should parse only if the following lookahead token is not FUNCTION_SYM. |