memsql / dbbench

Database Benchmark Tool
Apache License 2.0
156 stars 32 forks source link

Removal and replacement of flag.Func for version compat #18

Closed lrogers-memsql closed 1 year ago

lrogers-memsql commented 2 years ago

Filed an issue about this. Basically, because we were using flag.Func we could not build dbbench on Go < 1.16 (as flag.Func was added in 1.16)

This was a quick fix-up (will likely need a review) that I was able to do some testing on 1.10 and 1.13. It appears it works fine on 1.13, but I'm getting a separate error for 1.10:

# github.com/vertica/vertica-sql-go
Go/src/github.com/vertica/vertica-sql-go/rows.go:328:25: undefined: sql.NullTime
# github.com/go-sql-driver/mysql
Go/src/github.com/go-sql-driver/mysql/nulltime.go:36:15: undefined: sql.NullTime

So with this PR, we can support Go versions 1.13+ (which includes the current 1.14 Go version on LTS Ubuntu for example) from my testing. May be able to get around the above error with some more research.

Would be smart to have someone else test this as well as I put it together pretty quickly. I ran it against a cluster (using the --url parameter which is the bulk of the changes here) and it performed as expected.