Bug #117788 'key' cannot be used as column name in CREATE TABLE

Submitted: 25 Mar 2025 11:28 Modified: 25 Mar 2025 13:53
Reporter: Guy Léonis Email Updates:
Status: Won't Fix Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:8.0.41 OS:Windows (Microsoft Windows 11 Home)
Assigned to: CPU Architecture:x86 (Dell XPS 17 9720)
Tags: parser error, SQL

[25 Mar 2025 11:28] Guy Léonis
Description:
When importing the attached SQL script 'test-utf8.sql', the messages in the attached log file 'test-utf8.log' are issued and the import fails.

When changing the 'key' column name to 'key_', the import is successful. This can be tried with the attached 'test.sql' file.

When searching the WEB, I didn't find a restriction targeting a 'key' column name.
I understand that 'key' is also used in SQL syntax (foreign key, primary key...) but that shouldn't be a problem for a parser. E.g. SQlite 3 allows it.

How to repeat:
See description.

Suggested fix:
Improve the SQL parser.
[25 Mar 2025 13:53] MySQL Verification Team
Hello Guy Léonis,

Thank you for the report and feedback.

regards,
Umesh
[14 Sep 18:06] Omer Barnir
Posted by developer:

This issue applies to the legacy MySQL Workbench 8.x implementation that is no longer supported or maintained.
MySQL Workbench 26.7 is a complete rewrite using a new technology stack and does not use the affected legacy implementation.
Therefore, this issue is not applicable to the current MySQL Workbench product and as such is closed.

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

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