| 1 |
source include/not_embedded.inc; |
| 2 |
source include/master-slave.inc; |
| 3 |
source include/rpl_reset.inc; |
| 4 |
|
| 5 |
# Suppress warnings that might be generated during the test |
| 6 |
disable_query_log; |
| 7 |
connection master; |
| 8 |
call mtr.add_suppression("Timeout waiting for reply of binlog"); |
| 9 |
connection slave; |
| 10 |
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group"); |
| 11 |
enable_query_log; |
| 12 |
|
| 13 |
connection master; |
| 14 |
|
| 15 |
# wait for dying connections (if any) to disappear |
| 16 |
let $wait_condition= select count(*) = 0 from information_schema.processlist where command='killed'; |
| 17 |
--source include/wait_condition.inc |
| 18 |
|
| 19 |
# 32*3-character ASCII password should work all right |
| 20 |
|
| 21 |
set sql_log_bin=0; |
| 22 |
grant replication slave on *.* to [email protected] identified by '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'; |
| 23 |
set sql_log_bin=1; |
| 24 |
|
| 25 |
connection slave; |
| 26 |
source include/stop_slave.inc; |
| 27 |
change master to master_user='rpl32',master_password='0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'; |
| 28 |
source include/start_slave.inc; |
| 29 |
|
| 30 |
connection master; |
| 31 |
drop table if exists t1; |
| 32 |
create table t1 (i int); |
| 33 |
insert into t1 values (1); |
| 34 |
sync_slave_with_master; |
| 35 |
echo [ synchronized ]; |
| 36 |
|
| 37 |
connection master; |
| 38 |
|
| 39 |
# 32*3+1 -character ASCII password expected to fail |
| 40 |
set sql_log_bin=0; |
| 41 |
grant replication slave on *.* to [email protected] identified by '0123456789abcdef0123456789abcdef!'; |
| 42 |
set sql_log_bin=1; |
| 43 |
|
| 44 |
connection slave; |
| 45 |
source include/stop_slave.inc; |
| 46 |
--error ER_WRONG_STRING_LENGTH |
| 47 |
change master to master_user='rpl33',master_password='0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef!'; |
| 48 |
|
| 49 |
# Check also master_user and master_host |
| 50 |
|
| 51 |
--error ER_WRONG_STRING_LENGTH |
| 52 |
change master to master_user='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; |
| 53 |
|
| 54 |
# One more char to the master host naturally max ends up with |
| 55 |
--error ER_WRONG_STRING_LENGTH |
| 56 |
change master to master_host='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddE'; |
| 57 |
|
| 58 |
# 48-character cyrillic password should work all right |
| 59 |
connection master; |
| 60 |
set sql_log_bin=0; |
| 61 |
grant replication slave on *.* to [email protected] identified by 'воттакойужпарольвоттакойужпарольвоттакойужпароль'; |
| 62 |
set sql_log_bin=1; |
| 63 |
|
| 64 |
connection slave; |
| 65 |
SET NAMES utf8; |
| 66 |
change master to master_user='rpl16cyr',master_password='воттакойужпарольвоттакойужпарольвоттакойужпароль'; |
| 67 |
source include/start_slave.inc; |
| 68 |
|
| 69 |
connection master; |
| 70 |
drop table if exists t1; |
| 71 |
create table t1 (i int); |
| 72 |
insert into t1 values (1); |
| 73 |
sync_slave_with_master; |
| 74 |
echo [ synchronized ]; |
| 75 |
|
| 76 |
# 48+1-character cyrillic password should fail |
| 77 |
|
| 78 |
connection master; |
| 79 |
set sql_log_bin=0; |
| 80 |
grant replication slave on *.* to [email protected] identified by 'воттакойужпарольвоттакойужпарольвоттакойужпароль!'; |
| 81 |
set sql_log_bin=1; |
| 82 |
|
| 83 |
connection slave; |
| 84 |
source include/stop_slave.inc; |
| 85 |
--error ER_WRONG_STRING_LENGTH |
| 86 |
change master to master_user='rpl17mix',master_password='воттакойужпарольвоттакойужпарольвоттакойужпароль!'; |
| 87 |
|
| 88 |
# Cleanup |
| 89 |
|
| 90 |
connection master; |
| 91 |
set sql_log_bin=0; |
| 92 |
drop user [email protected], [email protected], [email protected], [email protected]; |
| 93 |
set sql_log_bin=1; |
| 94 |
|
| 95 |
connection slave; |
| 96 |
change master to master_user='root',master_password=''; |
| 97 |
source include/start_slave.inc; |
| 98 |
|
| 99 |
connection master; |
| 100 |
drop table if exists t1; |
| 101 |
sync_slave_with_master; |
| 102 |
|
| 103 |
connection master; |
| 104 |
--source include/rpl_end.inc |