[MDEV-17677] Keywords are parsed as identifiers when followed by a dot Created: 2018-11-12  Updated: 2018-12-27

Status: Open
Project: MariaDB Server
Component/s: Parser
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-17674 GRANT ON PROCEDURE can be erroneously... Open

 Description   

Keywords immediately followed by a dot character are parsed as identifiers. So, e.g., this generates a syntax error:

MariaDB [test]> SELECT.1;
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 'SELECT.1' at line 1

This does not conform to the SQL standard. It should be normally parsed as equivalent to:

SELECT .1;

Note, other databases do understand this syntax:

Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
 
SQL> SELECT.1 FROM DUAL;
 
	.1
----------
	.1
SQL> 

psql (9.4.9)
Type "help" for help.
 
bar=> SELECT.1;
 ?column? 
----------
      0.1
(1 row)


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