Skip to content

Commit 0001ee5

Browse files
committed
Fixed output value of wsrep_cluster_status
1 parent 2573354 commit 0001ee5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* [FEATURE] Add `tls.insecure-skip-verify` flag to ignore tls verification errors (PR #417) #348
1313
* [FEATURE] Add new metrics to `replication_group_member_stats` collector to support MySQL 8.x.
1414
* [FEATURE] Add collector for `replication_group_members` (PR #459) #362
15+
* [BUGFIX] Fixed output value of wsrep_cluster_status #473
1516

1617
### BREAKING CHANGES:
1718

collector/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func parseStatus(data sql.RawBytes) (float64, bool) {
5656
if bytes.Equal(data, []byte("Primary")) {
5757
return 1, true
5858
}
59-
if bytes.Equal(data, []byte("non-Primary")) || bytes.Equal(data, []byte("Disconnected")) {
59+
if strings.EqualFold(string(data), "non-Primary") || bytes.Equal(data, []byte("Disconnected")) {
6060
return 0, true
6161
}
6262
if logNum := logRE.Find(data); logNum != nil {

0 commit comments

Comments
 (0)