Merge pull request #2891 from influxdb/jw-writes

Fix wrong value used for incorrect type error message
pull/2893/head
Jason Wilder 2015-06-10 16:11:04 -06:00
commit 659646b404
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@
- [#2869](https://github.com/influxdb/influxdb/issues/2869): Adding field to existing measurement causes panic
- [#2849](https://github.com/influxdb/influxdb/issues/2849): RC32: Frequent write errors
- [#2700](https://github.com/influxdb/influxdb/issues/2700): Incorrect error message in database EncodeFields
## v0.9.0-rc33 [2015-06-09]

View File

@ -519,7 +519,7 @@ func (f *FieldCodec) EncodeFields(values map[string]interface{}) ([]byte, error)
if field == nil {
panic(fmt.Sprintf("field does not exist for %s", k))
} else if influxql.InspectDataType(v) != field.Type {
return nil, fmt.Errorf("field \"%s\" is type %T, mapped as type %s", k, k, field.Type)
return nil, fmt.Errorf("field \"%s\" is type %T, mapped as type %s", k, v, field.Type)
}
var buf []byte