You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2024-02-26 13:25:09

somersetit
Member
Registered: 2006-07-20
Posts: 33

MySQL 8 reserved keywords

We are trying to upgrade our MySQL database server and are hitting a few errors around reserved keywords.

Usage of db objects with names conflicting with new reserved keywords
The following objects have names that conflict with new reserved keywords. Ensure queries sent by your applications use `quotes` when referring to them or they will result in errors.
More Information:
https://dev.mysql.com/doc/refman/en/keywords.html

glpi_displaypreferences.rank - Column name
glpi_projecttasklinks.lag - Column name
glpi_projecttasklinks.lead - Column name


We are currently on 10.0.7, but looking at the install files of newer versions through 10.0.12 it looks like these fields still exist in these two tables. 

Any insight on others hitting this issue?

Thank you!

Offline

#2 2024-02-26 14:41:00

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,424
Website

Re: MySQL 8 reserved keywords

The column names are not an issue. If you are getting SQL errors, then you need to provide the full error that is logged in the files/_log/sql-errors.log file as it indicates an issue in the code where names/identifiers are not quoted as they should be.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2024-02-26 19:01:55

somersetit
Member
Registered: 2006-07-20
Posts: 33

Re: MySQL 8 reserved keywords

The issue came up when trying to upgrade MySQL from 5.7 to 8.0.36.  MySQL introduced in 8.0.2 those three reserved keywords.

The upgrade of MySQL failed and rolled back as a result of this conflict in table structure.

Offline

#4 2024-02-26 19:36:22

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,424
Website

Re: MySQL 8 reserved keywords

So the error was from MySQL during the update, and not GLPI?
I would still need to see the exact error message that was shown. For MySQL to complain about a column name like that doesn't make sense especially when they say you can still use them as identifiers (just need quoted in queries).

Do you have queries saved as stored procedures/functions?


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

Board footer

Powered by FluxBB