Bug #87243 CHANGE MASTER TO MASTER_HOST truncated at 60 characters
Submitted: 28 Jul 2017 22:35 Modified: 30 Nov 2021 13:19
Reporter: Andrew Garner Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: replication

[28 Jul 2017 22:35] Andrew Garner
Description:
When configuring replication to use a hostname, CHANGE MASTER TO MASTER_HOST='...'  is truncated at 60 characters without warning.  The slave will fail to connect (or possibly connect to the wrong hostname depending on circumstances).

Long hostnames > 60 characters can be common in many cloud environments and in some circumstances resolving a long hostname to an IP (or shorter alias) addresses is difficult.

This is essentially a feature request to increase the limit for the MASTER_HOST option of CHANGE MASTER or at least flag this as an error if the given host string is larger than the supported value.

How to repeat:
CHANGE MASTER with a long hostname, such as:

CHANGE MASTER TO '07d9be12-095b-4676-be3b-a5e750a6ce3f.excessively.long.domain.name'.

Observe how this gets truncated without feedback to the operator.

Suggested fix:
Provide some option to at least error or warn on truncation and ideally support longer hostnames in some future release.
[29 Dec 2017 20:37] Daniƫl van Eeden
mysql> pager grep '`Host`'
PAGER set to 'grep '`Host`''
mysql> show create table mysql.slave_master_info\G
  `Host` char(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'The host name of the master.',
1 row in set (0.00 sec)
[30 Nov 2021 13:19] MySQL Verification Team
Hello Andrew Garner,

Thank you for the reasonable feature request.
Imho this is implemented after Bug #90601, please see Bug #90601.
Ideally, this should have been the base bug but since Bug #90601 is already fixed hence closing this request as duplicate of Bug #90601. Thank you.

regards,
Umesh