Browse Source

mysql: Null value should not be considered as previous value

fixes #8655
Daniel Lee 8 years ago
parent
commit
2479e51a6b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      pkg/tsdb/mysql/mysql.go

+ 3 - 0
pkg/tsdb/mysql/mysql.go

@@ -307,6 +307,9 @@ func (s *stringStringScan) Update(rows *sql.Rows) error {
 		return err
 	}
 
+	s.time = null.FloatFromPtr(nil)
+	s.value = null.FloatFromPtr(nil)
+
 	for i := 0; i < s.columnCount; i++ {
 		if rb, ok := s.rowPtrs[i].(*sql.RawBytes); ok {
 			s.rowValues[i] = string(*rb)