From b99b654c93e12de1260a171cfee188b7ae9a7e47 Mon Sep 17 00:00:00 2001 From: Anthony Yeh Date: Thu, 7 May 2015 17:06:40 -0700 Subject: [PATCH] Fix Mysqld.FindSlaves() for MySQL 5.6. In MySQL 5.6 GTID mode, the command listed in SHOW PROCESSLIST for slaves is "Binlog Dump GTID" rather than just "Binlog Dump". --- go/vt/mysqlctl/replication.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go/vt/mysqlctl/replication.go b/go/vt/mysqlctl/replication.go index c2450e822d0..9c526c0d58b 100644 --- a/go/vt/mysqlctl/replication.go +++ b/go/vt/mysqlctl/replication.go @@ -326,7 +326,8 @@ func (mysqld *Mysqld) FindSlaves() ([]string, error) { } addrs := make([]string, 0, 32) for _, row := range qr.Rows { - if row[colCommand].String() == binlogDumpCommand { + // Check for prefix, since it could be "Binlog Dump GTID". + if strings.HasPrefix(row[colCommand].String(), binlogDumpCommand) { host, _, err := netutil.SplitHostPort(row[colClientAddr].String()) if err != nil { return nil, fmt.Errorf("FindSlaves: malformed addr %v", err)