Bug #81309 Keywords UTC_DATE, UTC_TIME, UTC_TIMESTAMP should be non-reserved
Submitted: 4 May 2016 11:58 Modified: 6 May 2016 10:25
Reporter: Alexander Barkov Email Updates:
Status: In progress Impact on me:
None 
Category:MySQL Server: Parser Severity:S3 (Non-critical)
Version:5.7.11 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: parser

[4 May 2016 11:58] Alexander Barkov
Description:
This query:

SELECT * FROM utc_time;

returns an error:
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 'dt2' at line 1

This is wrong.
UTC_DATE, UTC_TIME, UTC_DATETIME  are not mentioned in the list of reserved keywords in the SQL Standard, and nothing in the grammar in sql_yacc.yy prevents them from being non-reserved.

How to repeat:
SELECT * FROM utc_time;
[6 May 2016 9:38] Gleb Shchepa
Hello Alexander,

Thank you for reporting this!
[6 May 2016 9:42] Gleb Shchepa
Note: UTC_DATETIME is a regular identifier in MySQL. I guess the reporter means UTC_TIMESTAMP instead.
[6 May 2016 10:24] Alexander Barkov
Sorry for a mistake in the original report. I mean UCS_TIMESTAMP instead of UTC_DATETIME.
[6 May 2016 10:25] Alexander Barkov
UTC_TIMESTAMP that is :)