Description:
In MySQL 8.4.0, four new reserved words were added to the server:
MANUAL
PARALLEL
QUALIFY
TABLESAMPLE
These four are now present in information_schema.keywords, but they incorrectly have reserved=0 when it should be 1.
Additionally, CUBE (a reserved word added in 8.0) is still reserved in 8.4, but information_schema.keywords incorrectly has reserved=0 for it now.
How to repeat:
Querying information_schema to show the incorrect data:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.4.0 MySQL Community Server - GPL
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SELECT * FROM information_schema.keywords where word IN ('cube', 'manual', 'parallel', 'qualify', 'tablesample');
+-------------+----------+
| WORD | RESERVED |
+-------------+----------+
| CUBE | 0 |
| MANUAL | 0 |
| PARALLEL | 0 |
| QUALIFY | 0 |
| TABLESAMPLE | 0 |
+-------------+----------+
5 rows in set (0.01 sec)
Proof these are indeed reserved words:
mysql> CREATE TABLE cube (id int);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cube (id int)' at line 1
mysql> CREATE TABLE manual (id int);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'manual (id int)' at line 1
mysql> CREATE TABLE parallel (id int);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'parallel (id int)' at line 1
mysql> CREATE TABLE qualify (id int);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'qualify (id int)' at line 1
mysql> CREATE TABLE tablesample (id int);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tablesample(id int)' at line 1
Suggested fix:
Please set reserved=1 for these five rows