info log id returns 0 if no replication

This commit is contained in:
siddontang 2014-10-09 11:03:58 +08:00
parent 771d32c879
commit 45a4dd1abc
1 changed files with 4 additions and 0 deletions

View File

@ -165,6 +165,10 @@ func (i *info) dumpReplication(buf *bytes.Buffer) {
p = append(p, infoPair{"last_log_id", s.LastID})
p = append(p, infoPair{"first_log_id", s.FirstID})
p = append(p, infoPair{"commit_log_id", s.CommitID})
} else {
p = append(p, infoPair{"last_log_id", 0})
p = append(p, infoPair{"first_log_id", 0})
p = append(p, infoPair{"commit_log_id", 0})
}
i.dumpPairs(buf, p...)