-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Support MySQL 8 #1470
Support MySQL 8 #1470
Conversation
@@ -199,7 +198,7 @@ private HikariDataSource verifyCharacterSet(String jdbcUrl) throws SQLException | |||
boolean result = new QueryRunner(dataSource).query("SHOW VARIABLES LIKE 'character\\_set\\_connection'", rs -> { | |||
rs.next(); | |||
String resultSetInt = rs.getString(2); | |||
assertEquals("Passing query parameters to set DB connection encoding is successful", "utf8", resultSetInt); | |||
assertEquals("Passing query parameters to set DB connection encoding is successful", "utf8mb4", resultSetInt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to match the changes mentioned here
For Connector/J 8.0.13 and later:
When UTF-8 is used for characterEncoding in the connection string, it maps to the MySQL character set name utf8mb4.
url = url + separator + "useSSL=false"; | ||
} | ||
|
||
if (! url.contains("allowPublicKeyRetrieval=")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main substance of this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for extracting AbstractContainerDatabaseTest
class also.
Thanks @kiview - will merge! |
When will you publish a release with this? |
This was released in 1.11.4 🎉 |
Fixes #736
Replaces #1168
Note that this PR includes some long overdue refactoring of the database container tests - it made sense to do this as I was adding another test class, and doing so without refactoring would have worsened duplication.
The actual substance of the change is quite small, and visible in the MySQLContainer class.
Quoting the rationale: