For each of my databases the following query is used to get and store a MD5 information identifying the consistency of the database format (more than 150 tables):
This worked for years on RHEL5/6 with MySQL.
Today by migrating on RHEL7/MariaDB I encounter problems with this query.
The result of the query is different following the name of the database.
As soon as it contains an underscore ("_") character the result is systematically false.
When displaying the result of the inner concatenation we can notice that the order to the concatenated strings is not correct when the name of the database contains an underscore:
(see also attached log files)
A flavor of this can already be noticed by performing a simple SELECT query on the COLUMNS table:
The type of the field which causes problem is an ENUM with a high number of elements:
When reducing the number of elements of the ENUM (to 2) the problem does no more appear.
It can also be noticed that the results are different following the user connecting to the database server:
- correct with the root user
- incorrect with the standard user defined for the application.
The problem seems similar to