influxdb/influxdb — pull request #223 by jvshahid (2014-01-31 19:51:58+00:00)
Title: Panic in server

Running the following query:

```
select count(distinct(mailing_recipient_id)) from /^store.*message_events$/
group by time(1m), event, _provider where time > 1391188799999999u and
time < 1391188860000000u
```

crashes with the following error:

```
Query: [select count(distinct(mailing_recipient_id)) from /^store.*message_events$/ group by time(1m), event, _provider where time > 1391188799999999u and time < 1391188860000000u]
Error: runtime error: invalid memory address or nil pointer dereference. Stacktrace: goroutine 21 [running]:
engine.recoverFunc(0xc2101f5406, 0x7, 0xc21004a790, 0xab)
/home/jvshahid/codez/influxdb/src/engine/engine.go:100 +0x106
runtime.panic(0x85ca60, 0xfab3e8)
/home/jvshahid/.gvm/gos/go1.2/src/pkg/runtime/panic.c:248 +0x106
engine.(*DistinctAggregator).AggregatePoint(0xc21016f600, 0xc210136e48, 0x18, 0x8a9d20, 0xc2101fa440, ...)
/home/jvshahid/codez/influxdb/src/engine/aggregator.go:850 +0x180
engine.(*CompositeAggregator).AggregatePoint(0xc2100b7dc0, 0xc210136e48, 0x18, 0x8a9d20, 0xc2101fa440, ...)
/home/jvshahid/codez/influxdb/src/engine/aggregator.go:69 +0x67
engine.func·010(0xc2101f7640, 0xc2101f7640, 0xc2101f7640)
/home/jvshahid/codez/influxdb/src/engine/engine.go:327 +0x319
datastore.(*LevelDbDatastore).sendBatch(0xc210081f50, 0xc210050e10, 0xc210020b40, 0xc21016f640, 0x8, ...)
/home/jvshahid/codez/influxdb/src/datastore/leveldb_datastore.go:919 +0x19a
datastore.(*LevelDbDatastore).executeQueryForSeries(0xc210081f50, 0xc2101f5406, 0x7, 0xc210136e48, 0x18, ...)
/home/jvshahid/c
```