Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.1, 10.2, 10.3, 10.4, 10.5
-
None
Description
In some cases, the parser treats keywords as identifiers near a dot character. Moreover, the behaviour depends on the presense of a space character between the dot and the identifier.
SELECT t1.select FROM t1; |
ERROR 1054 (42S22): Unknown column 't1.select' in 'field list'
|
Wrong. Should get a syntax error.
SELECT t1. select FROM t1; |
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 FROM t1' at line 1
|
Correct. Notice, the space after the dot.
SELECT t1 .select FROM t1; |
ERROR 1054 (42S22): Unknown column 't1.select' in 'field list'
|
Wrong. Should get a syntax error.
SELECT select.a FROM `select`; |
ERROR 1146 (42S02): Table 'test.select' doesn't exist
|
Wrong. Should get a syntax error.
SELECT select. a FROM `select`; |
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. a FROM `select`' at line 1
|
Correct. Notice, the space after the dot.
SELECT select .a FROM `select`; |
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 .a FROM `select`' at line 1
|
Correct. Notice the space before the dot.