Bug #109359 Keywords are not generate warnings

Submitted: 13 Dec 2022 9:52 Modified: 13 Dec 2022 10:07
Reporter: Shinya Sugiyama Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:8.0.31 OS:Any
Assigned to: CPU Architecture:Any

[13 Dec 2022 9:52] Shinya Sugiyama
Description:
SQL Syntax Notes
Important Change: Previously, MySQL supported the use of “full” as the name of a table, column, view, stored procedure, or stored function, as well as for the alias of a table, view, or column. Beginning with this release, using “full” (regardless of letter case) in this fashion as an unquoted identifier is now deprecated, and raises a warning. This is to align more closely with the SQL standard, in which FULL is reserved as a keyword.

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-31.html

It seems there is no warning appear for using keyward for object name,

How to repeat:

mysql> select @@version;
+-----------+
| @@version |
+-----------+
| 8.0.31    |
+-----------+
1 row in set (0.00 sec)

mysql> CREATE TABLE full (c1 INT, c2 INT);
Query OK, 0 rows affected (0.10 sec)

mysql> CREATE TABLE FULL(c1 INT, c2 INT);
Query OK, 0 rows affected (0.07 sec)

mysql> show tables;
+-------------------+
| Tables_in_POC8030 |
+-------------------+
| FULL              |
| auto_0            |
| auto_1            |
| full              |
+-------------------+
4 rows in set (0.00 sec)

mysql> select * from information_schema.keywords where word = 'full';
+------+----------+
| WORD | RESERVED |
+------+----------+
| FULL |        0 |
+------+----------+
1 row in set (0.00 sec)

### Seems other keywords are also same.

mysql> select * from information_schema.keywords where reserved = 0 limit 3;
+---------+----------+
| WORD    | RESERVED |
+---------+----------+
| ACCOUNT |        0 |
| ACTION  |        0 |
| ACTIVE  |        0 |
+---------+----------+
3 rows in set (0.00 sec)

mysql> create table ACCOUNT (id int, note varchar(10));
Query OK, 0 rows affected (0.13 sec)

Regards
[13 Dec 2022 10:07] MySQL Verification Team
Hello Shinya Sugiyama,

Thank you for the report and feedback.

regards,
Umesh

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

Page generated in 0.038 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.