*** sql/rpl_slave.cc.orig 2014-03-15 04:07:28.000000000 +0900 --- sql/rpl_slave.cc 2014-04-02 16:57:44.273814303 +0900 *************** *** 8211,8216 **** --- 8211,8228 ---- saved_log_pos= mi->get_master_log_pos(); /* + Check new-password's length is less-equal than 32 characters. + If its length is over 32 characters, raising error and + return immediately, before updating any information. + */ + if (lex_mi->password && strlen(lex_mi->password) > 32) + { + my_error(ER_RPL_INFO_DATA_TOO_LONG, MYF(0), "password"); + ret= true; + goto err; + } + + /* If the user specified host or port without binlog or position, reset binlog's name to FIRST and position to 4. */ *** mysql-test/suite/rpl/t/rpl_bug43439.test.orig 2014-04-02 17:41:57.881862024 +0900 --- mysql-test/suite/rpl/t/rpl_bug43439.test 2014-04-02 17:39:44.746825093 +0900 *************** *** 0 **** --- 1,21 ---- + --disable_warnings + CHANGE MASTER TO master_host= '127.0.0.1', master_port= 3306, master_user= 'initial_user', master_password= ''; + --enable_warnings + + --vertical_results + SHOW SLAVE STATUS; + + --error ER_RPL_INFO_DATA_TOO_LONG + CHANGE MASTER TO master_host= '127.0.1.1', master_port= 13306, master_user= 'this_must_not_be_updated', master_password= '123456789012345678901234567890123'; + + SHOW SLAVE STATUS; + + --disable_warnings + CHANGE MASTER TO master_host= '127.0.1.1', master_port= 13306, master_user= 'this_must_be_updated', master_password= '12345678901234567890123456789012'; + --enable_warnings + + SHOW SLAVE STATUS; + + RESET SLAVE ALL; + + --exit