mirror of
https://github.com/MariaDB/server.git
synced 2025-11-30 05:23:50 +03:00
MDEV-13384: "window" seems like a reserved column name but it's not listed as one
Window is a reserved keyword according to SQL Standard 2016. However, we can make the grammar slightly flexible by allowing WINDOW keyword everywhere except table aliases. Change yacc grammar to separate between all keywords and table_alias keywords.
This commit is contained in:
@@ -3273,3 +3273,19 @@ row_number() over (partition by i order by i) i
|
||||
1 1
|
||||
1 2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-13384: "window" seems like a reserved column name but it's not listed as one
|
||||
#
|
||||
# Currently we allow window as an identifier, except for table aliases.
|
||||
#
|
||||
CREATE TABLE door (id INT, window VARCHAR(10));
|
||||
SELECT id
|
||||
FROM door as window;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'window' at line 2
|
||||
SELECT id, window
|
||||
FROM door;
|
||||
id window
|
||||
SELECT id, window
|
||||
FROM door as window;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'window' at line 2
|
||||
DROP TABLE door;
|
||||
|
||||
Reference in New Issue
Block a user