contao / installation-bundle

[READ-ONLY] Contao Installation Bundle
GNU Lesser General Public License v3.0
8 stars 9 forks source link

admin is a reserved word in mySQL 8 #93

Closed fiedsch closed 6 years ago

fiedsch commented 6 years ago

When using contao/install I'm asked to create a admin user though there already exists a user with admin = '1' in the database.

When trying to create a (new) admin user an exception is thrown.

Reason:

I don't know if changes within Contao are required. Especially as admin will no longer be a reserved word from mySQL 8.0.12 on. So this is mostly to file the issue so it could by found if somebody else stumbles upon the same problem.

leofeyer commented 6 years ago

https://github.com/contao/installation-bundle/blob/4c1765a398cadea2ff683ac039ac2576b39ac608/src/InstallTool.php#L317-L337

@ausi Do I quote only admin or all field names?

ausi commented 6 years ago

AFAIR we agreed on only quoting reserved field names in hardcoded queries.

leofeyer commented 6 years ago

Ok. Looks crappy though. 😄

leofeyer commented 6 years ago

Fixed in 86f04c1394031ed00331625b8d565ee4944d3f0c and contao/core-bundle@4b2f9d2b96577d22a49c218bcdb48f67bd2051a3.