diff --git a/CHANGELOG.md b/CHANGELOG.md index a976fcc0d8158..720ed4b41507a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -160,6 +160,7 @@ consistent with the behavior of `collection_jitter`. - [#1425](https://github.com/influxdata/telegraf/issues/1425): Fix win_perf_counter "index out of range" panic. - [#1634](https://github.com/influxdata/telegraf/issues/1634): Fix ntpq panic when field is missing. - [#1637](https://github.com/influxdata/telegraf/issues/1637): Sanitize graphite output field names. +- [#1695](https://github.com/influxdata/telegraf/pull/1695): Fix MySQL plugin not sending 0 value fields. ## v0.13.1 [2016-05-24] diff --git a/plugins/inputs/mysql/mysql.go b/plugins/inputs/mysql/mysql.go index 63744d88cebd6..3bc0465690484 100644 --- a/plugins/inputs/mysql/mysql.go +++ b/plugins/inputs/mysql/mysql.go @@ -1511,7 +1511,7 @@ func parseValue(value sql.RawBytes) (float64, bool) { } if bytes.Compare(value, []byte("No")) == 0 || bytes.Compare(value, []byte("OFF")) == 0 { - return 0, false + return 0, true } n, err := strconv.ParseFloat(string(value), 64) return n, err == nil