| 1 |
# |
| 2 |
# WL#12571: Support fully qualified hostnames longer than 60 characters |
| 3 |
# |
| 4 |
# This test case asserts that a lengthy hostname reported to the user |
| 5 |
# through the various interfaces, after being set through CHANGE MASTER, |
| 6 |
# is correctly displayed. |
| 7 |
# |
| 8 |
|
| 9 |
##################################################### |
| 10 |
# |
| 11 |
# Interface Tests |
| 12 |
# |
| 13 |
##################################################### |
| 14 |
|
| 15 |
--source include/have_slave_repository_type_table.inc |
| 16 |
# we will configure the hostname ourselves |
| 17 |
--let $rpl_skip_start_slave= 1 |
| 18 |
--source include/master-slave.inc |
| 19 |
|
| 20 |
--let $lengthy_hostname=host_1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890 |
| 21 |
|
| 22 |
--source include/rpl_connection_slave.inc |
| 23 |
# |
| 24 |
# 1. Assertion: CHANGE MASTER TO (CMT) accepts a lengthy hostname |
| 25 |
# |
| 26 |
|
| 27 |
--replace_result $MASTER_MYPORT MASTER_PORT |
| 28 |
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST="$lengthy_hostname", SOURCE_PORT=$MASTER_MYPORT |
| 29 |
|
| 30 |
--let $i=3 |
| 31 |
while($i>0) |
| 32 |
{ |
| 33 |
|
| 34 |
if ($i == 3) |
| 35 |
{ |
| 36 |
# |
| 37 |
# 2. Assertion: assert that the hostname saved in mysql.slave_relay_log_info is correct |
| 38 |
# |
| 39 |
--let $hostname_read= `SELECT host FROM mysql.slave_master_info` |
| 40 |
--let $hostname_source= mysql.slave_master_info |
| 41 |
} |
| 42 |
|
| 43 |
if ($i == 2) |
| 44 |
{ |
| 45 |
# |
| 46 |
# 3. Assertion: assert that the hostname reported in P_S tables is correct |
| 47 |
# |
| 48 |
--let $hostname_read= `SELECT host FROM performance_schema.replication_connection_configuration` |
| 49 |
--let $hostname_source= performance_schema.replication_connection_configuration |
| 50 |
} |
| 51 |
|
| 52 |
if ($i == 1) |
| 53 |
{ |
| 54 |
# |
| 55 |
# 4. Assertion: assert that the hostname reported in SHOW SLAVE STATUS is correct |
| 56 |
# |
| 57 |
--let $hostname_read= query_get_value(SHOW SLAVE STATUS, Master_Host, 1) |
| 58 |
--let $hostname_source= SHOW SLAVE STATUS |
| 59 |
} |
| 60 |
|
| 61 |
--let $assert_cond= "$hostname_read" = "$lengthy_hostname" |
| 62 |
--let $assert_text= Hostname in $hostname_source matches the one set through CHANGE MASTER TO |
| 63 |
--source include/assert.inc |
| 64 |
|
| 65 |
--dec $i |
| 66 |
} |
| 67 |
|
| 68 |
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST="127.0.0.1" |
| 69 |
--source include/start_slave.inc |
| 70 |
|
| 71 |
--source include/rpl_end.inc |