parent
08d299f6c7
commit
59bbc5c8e3
|
@ -34,6 +34,7 @@
|
|||
- [#4237](https://github.com/influxdb/influxdb/issues/4237): DERIVATIVE() edge conditions
|
||||
- [#4263](https://github.com/influxdb/influxdb/issues/4263): derivative does not work when data is missing
|
||||
- [#4293](https://github.com/influxdb/influxdb/pull/4293): Ensure shell is invoked when touching PID file. Thanks @christopherjdickson
|
||||
- [#4296](https://github.com/influxdb/influxdb/pull/4296): Reject line protocol ending with '-'. Fixes [#4272](https://github.com/influxdb/influxdb/issues/4272)
|
||||
|
||||
## v0.9.4 [2015-09-14]
|
||||
|
||||
|
|
|
@ -560,6 +560,10 @@ func scanNumber(buf []byte, i int) (int, error) {
|
|||
// Is negative number?
|
||||
if i < len(buf) && buf[i] == '-' {
|
||||
i += 1
|
||||
// There must be more characters now, as just '-' is illegal.
|
||||
if i == len(buf) {
|
||||
return i, fmt.Errorf("invalid number")
|
||||
}
|
||||
}
|
||||
|
||||
// how many decimal points we've see
|
||||
|
|
|
@ -412,12 +412,18 @@ func TestParsePointNegativeWrongPlace(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestParsePointOnlyNegativeSign(t *testing.T) {
|
||||
_, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=-`)
|
||||
if err == nil {
|
||||
t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=-`)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParsePointFloatMultipleDecimals(t *testing.T) {
|
||||
_, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=1.1.1`)
|
||||
if err == nil {
|
||||
t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=1.1.1`)
|
||||
}
|
||||
println(err.Error())
|
||||
}
|
||||
|
||||
func TestParsePointInteger(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue