Repository navigation
fix mysql driver class - #7478
Merged
tfmorris merged 2 commits intoOct 21, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the MySQL JDBC driver class name from the deprecated com.mysql.jdbc.Driver to the current com.mysql.cj.jdbc.Driver to resolve a deprecation warning and ensure compatibility with MySQL Connector/J 8.0+.
Key Changes:
- Updated MySQL driver class constant to use the modern JDBC driver
- Added a test to verify the driver class can be loaded
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| MySQLDatabaseService.java | Updated DB_DRIVER constant to use the current MySQL JDBC driver class |
| MySQLConnectionManagerTest.java | Added test to verify driver class loading works correctly |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
tfmorris
reviewed
Oct 4, 2025
| private static final Logger logger = LoggerFactory.getLogger("MySQLDatabaseService"); | ||
| public static final String DB_NAME = "mysql"; | ||
| public static final String DB_DRIVER = "com.mysql.jdbc.Driver"; | ||
| public static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; |
Member
There was a problem hiding this comment.
Suggested change
| public static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; | |
| public static final String DB_DRIVER = com.mysql.cj.jdbc.Driver.class.getCanonicalName(); |
I dislike hiding class names in strings unless there's no choice. Is there any reason for us to not just use the class reference so that our tooling can help us track dependencies?
(I understand that this problem was not introduced by your PR)
tfmorris
force-pushed
the
gh-5794-fix-mysql-driver-namespace
branch
from
October 21, 2025 19:34
fdc4d37 to
4a490e3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #5794
Changes proposed in this pull request:
MySQLConnectionManager:OpenRefine/extensions/database/src/com/google/refine/extension/database/mysql/MySQLConnectionManager.java
Line 133 in b3693e0
To have a quick way to reproduce the warning and see that it disappears after the change I added the "test", but the commit "reproduce warning" can be dropped before merging.
Source
Source: https://dev.mysql.com/doc/connectors/en/connector-j-upgrading-to-8.0.html