Skip to content

Commit

Permalink
#89 #93 rollback: reset block buffers and close connection
Browse files Browse the repository at this point in the history
  • Loading branch information
kshvakov committed Mar 5, 2018
1 parent d6c12a4 commit 204d131
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,13 @@ func (ch *clickhouse) Rollback() error {
if !ch.inTransaction {
return sql.ErrTxDone
}
if ch.block != nil {
ch.block.Reset()
}
ch.block = nil
ch.buffer = nil
ch.inTransaction = false
return nil
return ch.conn.Close()
}

func (ch *clickhouse) CheckNamedValue(nv *driver.NamedValue) error {
Expand Down

0 comments on commit 204d131

Please sign in to comment.