ClickHouse / clickhouse-go

Golang driver for ClickHouse
Apache License 2.0
2.92k stars 562 forks source link

Validate connection in bad state before query execution in the stdlib database/sql driver #1396

Closed jkaflik closed 2 months ago

jkaflik commented 2 months ago

The current behavior of a library is to invalidate connection if it encounters any of ClickHouse errors. Connection in bad state shouldn't be reused. Stdlib driver attempts to use connection without checking whether the connection is in a good condition.

resolves https://github.com/ClickHouse/clickhouse-go/issues/1395