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 :)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.