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

fix(mysql-cdc): validate mysql version less then 8.4 #17728

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ public MySqlValidator(
@Override
public void validateDbConfig() {
try {
// TODO: check database server version
// Check whether MySQL version is less than 8.4,
// since MySQL 8.4 introduces some breaking changes:
// https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-0.html#mysqld-8-4-0-deprecation-removal
var major = jdbcConnection.getMetaData().getDatabaseMajorVersion();
var minor = jdbcConnection.getMetaData().getDatabaseMinorVersion();

if ((major > 8) || (major == 8 && minor >= 4)) {
throw ValidatorUtils.failedPrecondition("MySQL version should be less than 8.4");
}
validateBinlogConfig();
} catch (SQLException e) {
throw ValidatorUtils.internalError(e.getMessage());
Expand Down
Loading