-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add forward compatibility for caching_sha2_password and replication #18033
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
Add forward compatibility for caching_sha2_password and replication #18033
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
This extracts the logic from vitessio#18010 for replication setup. There are cases during upgrades and downgrades where the following can happen: - The replication user is created on a newer version with caching2_sha_password. - We downgrade from this newer version to an older version. - The older version doesn't have the logic to add the GET_SOURCE_PUBLIC_KEY flag so it fails to re-enable replication. What this tells us, is that we need to first ship the change here to allow for future forward compatibility in v22, so we can change the default safely in v23. Signed-off-by: Dirkjan Bussink <[email protected]>
b05e797 to
b64b778
Compare
| if params.SslEnabled() { | ||
| args = append(args, "SOURCE_SSL = 1") | ||
| } else { | ||
| args = append(args, "GET_SOURCE_PUBLIC_KEY = 1") |
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.
See https://dev.mysql.com/doc/refman/8.4/en/change-replication-source-to.html#crs-opt-get_source_public_key for what this flag does. It's only needed when SSL is not used for replication.
GuptaManan100
left a comment
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
This extracts the logic from #18010 for replication setup. There are cases during upgrades and downgrades where the following can happen:
What this tells us, is that we need to first ship the change here to allow for future forward compatibility in v22, so we can change the default safely in v23.
It's safe to also send down this flag even with using
mysql_native_password.Related Issue(s)
Part of #17966
Checklist