-
Notifications
You must be signed in to change notification settings - Fork 1k
replication: Improve COM_REGISTER_SLAVE #967
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
Conversation
| data[pos] = uint8(len(b.cfg.Password)) | ||
| data[pos] = uint8(0) | ||
| pos++ | ||
| n = copy(data[pos:], b.cfg.Password) |
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.
😂 Don't know why we bother to send password before. Does different version of server has different behaviour?
Will take a look soon
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.
Oh interesting, we don't need to send the password?
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.
The password is only for use in the output of SHOW REPLICAS if --show-replica-auth-info is enabled. This makes it a bit of a security hazard and with the length limitation also quite useless.
2269029 to
dd23731
Compare
|
Can confirm that this fixes the issue that I was previously seeing. Thanks for the fix @dveeden ! |
If we send `SET @replica_uuid=` after `COM_REGISTER_SLAVE` it won't be picked up in `SHOW REPLICAS`.
|
@lance6716 not sure how to best test this, could you help with that?
|
I have checked it. Merging |
This:
COM_REGISTER_SLAVESET @replica_uuid=before runningCOM_REGISTER_SLAVEImpact:
SHOW REPLICASshows an empty password even if--show-replica-auth-infois used.COM_REGISTER_SLAVEwon't fail due to too long passwordsSHOW REPLICASnow shows theReplica_UUIDcorrectly.Closes #966