Bug #22989 START SLAVE causes Error on COM_REGISTER_SLAVE: 1105 'Wrong parameters to functi
Submitted: 4 Oct 2006 19:06 Modified: 29 Mar 2008 13:22
Reporter: Ian Gulliver
Status: Closed
Category:Server: Replication Severity:S2 (Serious)
Version:5.0.18 OS:Linux (Debian Sarge)
Assigned to: Sergey Vojtovich Target Version:5.0+,5.1.24
Triage: D2 (Serious)

[4 Oct 2006 19:06] Ian Gulliver
Description:
Starting slave fails to start the slave IO thread.  The log records:

061004 13:00:08 [Note] Slave SQL thread initialized, starting replication in log 'FIRST'
at position 0, relay log './db2-relay-bin.000001' position: 4
061004 13:00:08 [Note] Slave I/O thread: connected to master
'db2@db1.waytechnology.coresense.com:3306',  replication started in log 'FIRST' at
position 4
061004 13:00:08 [ERROR] Error on COM_REGISTER_SLAVE: 1105 'Wrong parameters to function
register_slave'
061004 13:00:08 [Note] Slave I/O thread exiting, read up to log 'FIRST', position 4

How to repeat:
Exact cause unknown; environment has both MyISAM and InnoDB tables, stored procedures and
triggers.
[4 Oct 2006 19:16] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version of master and
slave, 5.0.24a. In case of similar problem, please, send my.cnf from both servers and
upload problematic binary log that can not be replicated.
[4 Oct 2006 19:26] Ian Gulliver
I'm afraid I can't do either of these.  We're bound to the MySQL version by distribution
needs and the binary log contains sensitive customer info.
[5 Oct 2006 8:39] Valeriy Kravchuk
If this problem is a result of a bug, please, note, that the bug will be fixed in the
latest version anyway.

To check if it is a bug we need a repeatable test case. Can you try to send statement at
position 4 of that ./db2-relay-bin.000001 (as private comments, or with data changed)?
What version do you have as slave? 5.0.18? Then what version master is?
[5 Oct 2006 20:58] Ian Gulliver
The mysterious error turned out to have nothing to do with the log on either machine; the
slave couldn't handshake because its report-host variable was too long.
[6 Oct 2006 14:55] Valeriy Kravchuk
So, can we close this bug report as not a bug now?
[6 Oct 2006 15:17] Ian Gulliver
Looks like a bug to me; MySQL should either support arbitrary-length report-host names or
provide a useful error when it fails due to a long hostname.
[1 Nov 2006 19:28] Valeriy Kravchuk
This is either a bug, or, if there is some well-known hardcoded limit, it should be
described at http://dev.mysql.com/doc/refman/5.0/en/replication-options.html.
[11 Jun 2007 11:31] Lars Thalmann
See also BUG#19328
[29 Jan 2008 15:06] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/41365

ChangeSet@1.2594, 2008-01-29 18:05:14+04:00, svoj@mysql.com +1 -0
  BUG#22989 - START SLAVE causes Error on COM_REGISTER_SLAVE: 1105
              'Wrong parameters to functi
  
  START SLAVE reports vague error when it fails to register on master:
  "Wrong parameters to function register_slave".
  
  If master failed to register slave because of too long
  'report-host'/'report-user'/'report-password', return better error
  messages:
  "Failed to register slave: too long 'report-host'"
  "Failed to register slave: too long 'report-user'"
  "Failed to register slave; too long 'report-password'"
  
  No test case for this fix.
[31 Jan 2008 16:06] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/41504

ChangeSet@1.2569, 2008-01-31 18:51:20+04:00, svoj@mysql.com +1 -0
  BUG#22989 - START SLAVE causes Error on COM_REGISTER_SLAVE: 1105
              'Wrong parameters to functi
  
  START SLAVE reports vague error when it fails to register on master:
  "Wrong parameters to function register_slave".
  
  If master failed to register slave because of too long
  'report-host'/'report-user'/'report-password', return better error
  messages:
  "Failed to register slave: too long 'report-host'"
  "Failed to register slave: too long 'report-user'"
  "Failed to register slave; too long 'report-password'"
  
  No test case for this fix.
[27 Mar 2008 12:18] Bugs System
Pushed into 5.1.24-rc
[27 Mar 2008 12:21] Bugs System
Pushed into 5.0.60
[27 Mar 2008 18:50] Bugs System
Pushed into 6.0.5-alpha
[29 Mar 2008 13:22] Jon Stephens
Bugfix documented as follows in the 5.0.60, 5.1.24, and 6.0.5 changelogs:

        The inspecific error message Wrong parameters to
        function register_slave resulted when START SLAVE failed to register on the
        master due to excess length of any the slave server options --report-host,
        --report-user, or --report-password. An error message specific to each
        of these options is now returned in such cases. The new error messages
        are:
        
        Failed to register slave: too long 'report-host'
        
        Failed to register slave: too long 'report-user'
        
        Failed to register slave; too long 'report-password'
[30 Mar 2008 1:03] Jon Stephens
Also documented in 5.1.23-ndb-6.3.11 changelog.