diff --git a/CHANGELOG.md b/CHANGELOG.md index 7db2d2f986..8433adc871 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - [#3289](https://github.com/influxdb/influxdb/issues/3289): InfluxDB crashes on floats without decimal - [#3298](https://github.com/influxdb/influxdb/pull/3298): Corrected WAL & flush parameters in default config. Thanks @jhorwit2 - [#3152](https://github.com/influxdb/influxdb/issues/3159): High CPU Usage with unsorted writes +- [#3307](https://github.com/influxdb/influxdb/pull/3307): Fix regression parsing boolean values True/False ## v0.9.1 [2015-07-02] diff --git a/tsdb/points.go b/tsdb/points.go index f3125a15af..26cec3ed5b 100644 --- a/tsdb/points.go +++ b/tsdb/points.go @@ -612,9 +612,9 @@ func scanBoolean(buf []byte, i int) (int, []byte, error) { case 'f': valid = bytes.Equal(buf[start:i], []byte("false")) case 'T': - valid = bytes.Equal(buf[start:i], []byte("TRUE")) + valid = bytes.Equal(buf[start:i], []byte("TRUE")) || bytes.Equal(buf[start:i], []byte("True")) case 'F': - valid = bytes.Equal(buf[start:i], []byte("FALSE")) + valid = bytes.Equal(buf[start:i], []byte("FALSE")) || bytes.Equal(buf[start:i], []byte("False")) } if !valid { diff --git a/tsdb/points_test.go b/tsdb/points_test.go index 9fa2af3180..a28e02e044 100644 --- a/tsdb/points_test.go +++ b/tsdb/points_test.go @@ -710,7 +710,7 @@ func TestParsePointWithStringWithEquals(t *testing.T) { } func TestParsePointWithBoolField(t *testing.T) { - test(t, `cpu,host=serverA,region=us-east true=true,t=t,T=T,TRUE=TRUE,false=false,f=f,F=F,FALSE=FALSE 1000000000`, + test(t, `cpu,host=serverA,region=us-east true=true,t=t,T=T,TRUE=TRUE,True=True,false=false,f=f,F=F,FALSE=FALSE,False=False 1000000000`, NewPoint( "cpu", Tags{ @@ -721,10 +721,12 @@ func TestParsePointWithBoolField(t *testing.T) { "t": true, "T": true, "true": true, + "True": true, "TRUE": true, "f": false, "F": false, "false": false, + "False": false, "FALSE": false, }, time.Unix(1, 0)),