Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mysql 8] Cerberus no compliant #2466

Closed
mflorid opened this issue Jun 5, 2023 · 3 comments
Closed

[Mysql 8] Cerberus no compliant #2466

mflorid opened this issue Jun 5, 2023 · 3 comments

Comments

@mflorid
Copy link
Collaborator

mflorid commented Jun 5, 2023

Adeo do the migration to Mysql 8 last week. We have encouter some trubles that have contrain us to roll back.

Here is the détails :

We have SQL errors linked to incompatibility with MySQL 8

Case 1

Query that comes from cerberus testing github

SELECT * FROM testdatalib tdl
LEFT OUTER JOIN testdatalibdata tdd ON tdl.TestDataLibID = tdd.TestDataLibID and tdd.Subdata=''
WHERE `name` LIKE 'ELIGIBILITY-DATA'
and (`system` = '' or `system` = '')
and (`environment` = '' or `environment` = '')
and (`country` = '' or `country` = '')
ORDER BY `name` DESC, system DESC, environment DESC, country DESC, tdl.TestDataLibID ASC
LIMIT 1 

Executed on MySQL 5.6: OK

Executed on MySQL 8.0.30:

SQL Error [1064] [42000]: 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 'system DESC, environment DESC, country DESC, tdl.TestDataLibID ASC
LIMIT 1' at line 7 
Error reported by Cerberus logs

ERROR TestDataLibDAO:197 - Unable to execute query : com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'system DESC, environment DESC, country DESC, tdl.TestDataLibID ASC LIMIT 1' at line 1 

Other cases

May 30 08:55:31 instance-cerberus-front-prod tomcat9[1427200]: 2023-05-30 08:55:31 ERROR TestCaseDAO:868 - Unable to execute query : java.sql.SQLSyntaxErrorException: Expression #
53 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'cerberus_prod.tel.Id' which is not functionally dependent on columns in GROUP BY clause; this is inc
ompatible with sql_mode=only_full_group_by 
May 30 08:36:17 instance-cerberus-front-prod tomcat9[199991]: Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'N'
May 30 08:36:17 instance-cerberus-front-prod tomcat9[199991]:         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976) ~[mysql-connector-java-5.1.47-bin.jar:5.1.47]
vertigo17 added a commit that referenced this issue Jun 5, 2023
@vertigo17
Copy link
Member

Hello @mflorid can you confirm which version of Cerberus you use ?
MySQL 8 require at least v4.15
I did perform a 1st fix on the 1st error.
I will check the other later this week.

@mflorid
Copy link
Collaborator Author

mflorid commented Jun 6, 2023

Hello @vertigo17

We are in 4.16. We didnt check all the app maybe there is more request impacted.

vertigo17 added a commit that referenced this issue Jun 26, 2023
@vertigo17
Copy link
Member

duplicate of #2251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants