mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Test suite incompatibility with MySQL 9.4: LIBRARY is a reserved word #7553
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mbeccati on GitHub (Sep 19, 2025).
Bug Report
Summary
Apparently since MySQL 9.4 "LIBRARY" is a reserved SQL word, so the Library Enum in the test suite is causing an SQL error:
I was about to send a PR, but TBH I'm not sure if the driver should manage quoting the table name in case it's a reserved word, or if the entity should simply use a different table name.
Current behavior
Doctrine\ORM\Tools\ToolsException: Schema-Tool failed with Error 'An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 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 'Library (id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY (id)) DEFAULT CHARACTER SET' at line 1' while executing DDL: CREATE TABLE Library (id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE
utf8mb4_unicode_ciENGINE = InnoDBExpected behavior
Test(s) pass
How to reproduce
Run test suite with MySQL 9.4