MCPcopy Create free account
hub / github.com/apecloud/myduckserver / wrapResultCallback

Function wrapResultCallback

backend/handler.go:45–54  ·  view source on GitHub ↗
(callback mysql.ResultSpoolFn, modifiers ...ResultModifier)

Source from the content-addressed store, hash-verified

43
44func (h *MyHandler) ConnectionClosed(c *mysql.Conn) {
45 var expectedConn *stdsql.Conn
46 var expectedTx *stdsql.Tx
47 if h != nil && h.provider != nil && h.provider.Pool() != nil && c != nil {
48 expectedConn, expectedTx = h.provider.Pool().GetTxnBindingForRelease(c.ConnectionID)
49 }
50 // Let GMS remove the session first. Its LifecycleAwareSession callback
51 // (SessionEnd) must still see the generic pool connection while it rolls back
52 // a logical autocommit transaction and performs any same-connection cleanup;
53 // closing the pool entry first could make that cleanup acquire and strand a
54 // replacement connection. The final pool close then retires the exact entry.
55 if h != nil && h.Handler != nil {
56 h.Handler.ConnectionClosed(c)
57 }

Callers 2

ComMultiQueryMethod · 0.85
ComQueryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected