Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL)
Description
The window_spec clause in sql_yacc.yy has a shift/reduce conflict.
In a query like this:
SELECT .. COUNT(*) OVER (rows ...); |
It's not clear what rows stands for. It can be ident in opt_window_ref:
SELECT ... COUNT(*) OVER (rows ORDER BY ...); |
or the ROWS keyword in window_frame_units:
SELECT ... COUNT(*) OVER (ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING); |
The conflict happens because ROWS is a non-reserved keyword in MariaDB.
Possible solutions:
- Make ROWS a reserved keyword, as in the SQL standard
- Or change the ident part in opt_window_ref to a new rule ident_window_ref which will not include ROWS.
Attachments
Issue Links
- relates to
-
MDEV-9979 Keywords UNBOUNDED, PRECEDING, FOLLOWING, TIES, OTHERS should be non-reserved
- Closed