We're updating the issue view to help you get more done.Learn more

Password length in replication setup

There was an IRC discussion on master_password length, and two points came up:

1. Max length for master password in replication setup is 32, Monty wanted to add an error if a longer one is used:

<montywi> elenst: would it be fast for you to do a rpl test that would test connecting with a password of 32 and then 33 ?
<montywi> That would allow me to quickly add an error message if one used change_master with too long password

2. If non-ascii symbols are used in the master password, it decreases the max length

<montywi> elenst: can you also add the above example to the mtr test.
<montywi> I assume this could be because the master_password in this case will not be threated as binary, as it probably should, but by the current connect character set
<montywi> hm, looks like it should be threated as binary. Strange...

So, I've attached an MTR test case with result file, which tries 4 replication passwords:

  • 32 ascii symbols, it's expected to work and it does;
  • 33 ascii symbols, it's not expected to work and it doesn't – one can set such a password in change_master, but IO thread won't connect. That's apparently where Monty wanted to add an error – so that one couldn't make a mistake setting a too long password;
  • 16 cyrillic symbols, it's expected to work and it does, as long as slave has NAMES utf8;
  • 16 cyrillic symbols + 1 ascii symbol: I don't know if it's expected to work or not, the conclusion wasn't clear; currently it doesn't, and that's how the test was created, it expects start slave to fail when such password is configured. If that's wrong behavior, the test will need to be modified.