-
Notifications
You must be signed in to change notification settings - Fork 1k
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
replication: Improve COM_REGISTER_SLAVE #967
Conversation
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_SLAVE
SET @replica_uuid=
before runningCOM_REGISTER_SLAVE
Impact:
SHOW REPLICAS
shows an empty password even if--show-replica-auth-info
is used.COM_REGISTER_SLAVE
won't fail due to too long passwordsSHOW REPLICAS
now shows theReplica_UUID
correctly.Closes #966