RedisGraph / redisgraph-go

A Golang client for redisgraph
https://redisgraph.io
BSD 3-Clause "New" or "Revised" License
132 stars 38 forks source link

query CREATE INDEX panics go #23

Closed jinxmcg closed 4 years ago

jinxmcg commented 4 years ago

Hi,

The query gets executed but the go program panics

graph.Query("CREATE INDEX ON :user(name)")

goroutine 1 [running]: github.com/redislabs/redisgraph-go.QueryResultNew(0xc0000f6000, 0x61cc40, 0xc00000e4e0, 0xc0000aea80, 0x3, 0x3) /home/jinx/go/src/github.com/redislabs/redisgraph-go/query_result.go:85 +0x2f0 github.com/redislabs/redisgraph-go.(*Graph).Query(0xc0000f6000, 0x6788ed, 0x1b, 0x6747d9, 0xa, 0xbf731e6f36bbc14c) /home/jinx/go/src/github.com/redislabs/redisgraph-go/graph.go:108 +0x162

I think the issue is in query_result.go qr.parseStatistics(r[2]) the Create index only return two values so r[2] is out of bounds.

Thanks

DvirDukhan commented 4 years ago

@jinxmcg work in progress

DvirDukhan commented 4 years ago

@jinxmcg RedisGraph 1.99.7 should solve your issue. please confirm

jinxmcg commented 4 years ago

Yes, I confirm it works. Thank you.