1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
#
# This test validates a fix for a bug where slaves only read the
# first 41 characters of MASTER_PASSWORD from the master.info file
# after restarts.
#
# The test ensures that passwords up to the maximum allowable
# length (96 ASCII characters) will be read from the master.info
# file after slave restarts
#
# References:
# MDEV-23857: replication master password length
#
# Test is format independent, so only run with one format
--source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
#####
# Setup
#
--let $passwd=123456789X12141618202224262830323436384042444648505254565860626466687072747678808284868890929496
--let $expected_pwlen=96
--let assert_cond=CHAR_LENGTH("$passwd")=$expected_pwlen
--let assert_text=Password length is $expected_pwlen
--source include/assert.inc
connection master;
SET SQL_LOG_BIN=0;
--eval GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY '$passwd'
SET SQL_LOG_BIN=1;
#####
#####
# Change master to new user/password combination
#
connection slave;
--source include/stop_slave.inc
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', master_user='rpl', master_password='$passwd'
--source include/start_slave.inc
--let $slave_param= Slave_IO_Running
--let $slave_param_value= Yes
--source include/check_slave_param.inc
#####
#####
# Ensure slave can re-connect to master after restart
#
connection master;
--let $rpl_server_number= 2
--source include/rpl_restart_server.inc
connection slave;
--source include/start_slave.inc
--let $slave_param= Slave_IO_Running
--let $slave_param_value= Yes
--source include/check_slave_param.inc
#####
#####
# Cleanup
#
connection master;
SET SQL_LOG_BIN=0;
DROP USER rpl@127.0.0.1;
FLUSH PRIVILEGES;
SET SQL_LOG_BIN=1;
connection slave;
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USER = 'root', MASTER_PASSWORD = '';
--source include/start_slave.inc
connection master;
-- source include/rpl_end.inc
#####
|