From a42e1e3885ce4519bb5db2f02f2448d0a29cd7a7 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 11 Jan 2013 00:35:33 +0200 Subject: Fixed MDEV-4013: Password length in replication setup Give error for wrong parameters to CHANGE MASTER Extend MASTER_PASSWORD and MASTER_HOST lengths mysql-test/suite/rpl/r/rpl_password_boundaries.result: Test length of MASTER_PASSWORD, MASTER_HOST and MASTER_USER mysql-test/suite/rpl/r/rpl_semi_sync.result: Use different password than user name for better test coverage mysql-test/suite/rpl/t/rpl_password_boundaries.test: Test length of MASTER_PASSWORD, MASTER_HOST and MASTER_USER mysql-test/suite/rpl/t/rpl_semi_sync.test: Use different password than user name for better test coverage sql/rpl_mi.h: Extend MASTER_PASSWORD and MASTER_HOST lengths sql/sql_repl.cc: Give error for wrong parameters to CHANGE MASTER sql/sql_repl.h: Extend MASTER_PASSWORD and MASTER_HOST lengths --- sql/rpl_mi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/rpl_mi.h') diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h index a885576ef1c..64525f81603 100644 --- a/sql/rpl_mi.h +++ b/sql/rpl_mi.h @@ -66,9 +66,9 @@ class Master_info : public Slave_reporting_capability /* the variables below are needed because we can change masters on the fly */ char master_log_name[FN_REFLEN]; - char host[HOSTNAME_LENGTH+1]; - char user[USERNAME_LENGTH+1]; - char password[MAX_PASSWORD_LENGTH+1]; + char host[HOSTNAME_LENGTH*SYSTEM_CHARSET_MBMAXLEN+1]; + char user[USERNAME_LENGTH*+1]; + char password[MAX_PASSWORD_LENGTH*SYSTEM_CHARSET_MBMAXLEN+1]; bool ssl; // enables use of SSL connection if true char ssl_ca[FN_REFLEN], ssl_capath[FN_REFLEN], ssl_cert[FN_REFLEN]; char ssl_cipher[FN_REFLEN], ssl_key[FN_REFLEN]; -- cgit v1.2.1