Skip to content

Commit

Permalink
Fix Mysqld.FindSlaves() for MySQL 5.6.
Browse files Browse the repository at this point in the history
In MySQL 5.6 GTID mode, the command listed in SHOW PROCESSLIST for slaves
is "Binlog Dump GTID" rather than just "Binlog Dump".
  • Loading branch information
enisoc committed May 8, 2015
1 parent 152f04e commit b99b654
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go/vt/mysqlctl/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b99b654

Please sign in to comment.