[MDEV-15709] Is "over" supposed to be a reserved word in 10.2? Created: 2018-03-28  Updated: 2018-03-29  Resolved: 2018-03-28

Status: Closed
Project: MariaDB Server
Component/s: Parser
Affects Version/s: 10.2.14
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Pascal Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

CentOS Linux release 7.4.1708 (Core)
Linux version 2.6.32-042stab127.2 (root@kbuild-rh6-x64.eng.sw.ru) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Thu Jan 4 16:41:44 MSK 2018



 Description   

I just upgraded from MariaDB-server-10.1.32-1.el7.centos.x86_64 to MariaDB-server-10.2.14-1.el7.centos.x86_64 via http://yum.mariadb.org/10.2/centos7-amd64

I have a column named "over". I did not used to have to quote it. Now I do. The reserved word list at https://mariadb.com/kb/en/library/reserved-words/ shows RECURSIVE and ROWS, new in 10.2, but it does not show over.

MariaDB [test]> CREATE TABLE test_over (`id` BIT, `over` BIT);
Query OK, 0 rows affected (0.01 sec)
MariaDB [test]> SELECT * FROM test_over WHERE over IS NULL;
ERROR 1064 (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 'over IS NULL' at line 1
MariaDB [test]> SELECT * FROM test_over WHERE id IS NULL;
Empty set (0.00 sec)
MariaDB [test]> SELECT * FROM test_over WHERE `over` IS NULL;
Empty set (0.00 sec)



 Comments   
Comment by Alice Sherepa [ 2018-03-28 ]

Hi Pascal, yes, it is a reserved word, used for window functions, please read here https://mariadb.com/kb/en/library/window-functions-overview/ Thanks for pointing that list of reserved words should be updated.

Comment by Pascal [ 2018-03-28 ]

Please also fix the Release Notes, Changelog, and Upgrade notes. I searched all of them before posting here and though they talk about new reserved words, none mention over.

Are there any other new reserved words that did not get documented? Is there a way to retrieve a list of all reserved words so you can make sure they are all documented? Have you thought about what change(s) need to be made to the release process to ensure this does not happen again?

Thank you.

Comment by Alice Sherepa [ 2018-03-28 ]

I guess the best way to check if the word is reserved is to check in the source code (https://github.com/MariaDB/server/blob/10.2/sql/lex.h)
I do understand it is frustrating, that KB or notes do not give up-to-date information.
(KB says: "The definitive list of reserved words for each version is all words that are listed in the sql/lex.h file that are not listed in the keyword rule of sql/sql_yacc.yy, or the keyword_sp rule that keyword rule includes.")

Comment by Pascal [ 2018-03-29 ]

I just noticed that at the end of that list of reserved words webpage, someone reported over 2 years ago that RETURNING is missing from the list. I figured out how to edit the pages in the KB and added OVER a few places, RETURNING to that list, and ROWS to another.

Comment by Alice Sherepa [ 2018-03-29 ]

Thanks a lot!)

Generated at Thu Feb 08 08:23:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.