MCPcopy
hub / github.com/go-sql-driver/mysql / Rollback

Method Rollback

transaction.go:31–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31func (tx *mysqlTx) Rollback() (err error) {
32 if tx.mc == nil {
33 return ErrInvalidConn
34 }
35 if tx.mc.closed.Load() {
36 err = tx.mc.error()
37 if err == nil {
38 err = ErrInvalidConn
39 }
40 return
41 }
42 err = tx.mc.exec("ROLLBACK")
43 tx.mc = nil
44 return
45}

Callers 1

Calls 2

errorMethod · 0.80
execMethod · 0.80

Tested by 1