WL#8662: Deprecate and remove "Delphi style" column and table syntax
Affects: Server-8.0 — Status: Complete — Priority: Medium
The parser supports old Deplhi style syntax for columns and table names: * .column_name * .table_name.column_name * .table_name I.e. dot sign followed by the column/table name. The first syntax (".col_name") and the second one (".table_name.column_name") doesn't seem to be documented at all. The third syntax (".tbl_name") is documented at http://dev.mysql.com/doc/refman/5.7/en/identifier-qualifiers.html : : The syntax .tbl_name means the table tbl_name in the default database. : This syntax is accepted for ODBC compatibility because some ODBC programs : prefix table names with a “.” character. Conclusion: it would be nice to remove the .column_name syntax in 8.0. Reasoning: the syntax is undocumented and most likely unused. **User Documentation** * https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-20.html * https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html * https://dev.mysql.com/doc/refman/5.7/en/identifier-qualifiers.html (deprecation notice) * https://dev.mysql.com/doc/refman/8.0/en/identifier-qualifiers.html (removal of deprecated syntax)
Functional requirements ======================= In 8.0 ------ * F-1: The ".column_name" syntax should cause a syntax error. * F-2: The ".table_name.column_name" syntax should cause a syntax error. * F-3: The ".table_name" syntax should cause a syntax error. Non-functional requirements =========================== In 5.7 ------ * NF-1: Each ".table_name" syntax in any valid SQL statement should cause a deprecation warning. * NF-2: Each ".table_name.column_name" syntax in any valid SQL statement should causes a deprecation warning. * NF-3: Each ".column_name" syntax in any valid SQL statement should cause a deprecation warning.
.column syntax ============== 5.7 --- Output a warning on each `.<column name>` entry in DDL: Warning 1287 '.<column>' is deprecated and will be removed in a future release. Please use the column name without a dot prefix instead 8.0 --- Output a syntax error on the 1st .<column name> entry in DDL. .table syntax ============= 5.7 --- Output a warning on each `.<table name>` entry in DDL: Warning 1287 '.<table>' is deprecated and will be removed in a future release. Please use the table name without a dot prefix instead 8.0 --- Nothing to do, has done with WL#8657.
Copyright (c) 2000, 2019, Oracle Corporation and/or its affiliates. All rights reserved.