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

Initial MySQL 8.4 compliance implementation #5549

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

obabec
Copy link
Contributor

@obabec obabec commented May 9, 2024

No description provided.

@obabec
Copy link
Contributor Author

obabec commented May 9, 2024

/packit test --labels mysql

Copy link

github-actions bot commented May 9, 2024

Hi @obabec, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

@obabec
Copy link
Contributor Author

obabec commented May 9, 2024

/packit test --labels mysql

Copy link

github-actions bot commented May 9, 2024

Hi @obabec, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

Comment on lines +56 to +60
String showMasterStmt = "SHOW MASTER STATUS";

if (complianceMode.equals(MySqlConnectorConfig.ComplianceMode.MYSQL_84_PLUS)) {
showMasterStmt = "SHOW BINARY LOG STATUS;";
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to necessarily do it now, but I wonder if we're going to see this type of behavior in the future with various MySQL versions if we should consider ComplianceMode returning an object that we can call somewhat like we do with the StreamingAdapter in the Oracle connector to abstract away these details of the if/else. This way in the call sites it's simply getComplianceMode().getShowMasterStatement() or something like this. This way it avoids the redundancy of this logic at each call site. wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is a great idea. TBH, this was just an initial implementation to figure out what changes I needed to make in our tests.

Copy link

github-actions bot commented May 9, 2024

Hi @obabec, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

@obabec
Copy link
Contributor Author

obabec commented May 9, 2024

/packit test --labels mysql

@jpechane
Copy link
Contributor

@obabec I'd see this PR should incorporate #5338 too to avoid authentication issue in future

@obabec
Copy link
Contributor Author

obabec commented May 15, 2024

@jpechane that makes sense to me :)

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