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

Method ComMultiQuery

backend/handler.go:56–66  ·  view source on GitHub ↗
(
	ctx context.Context,
	c *mysql.Conn,
	query string,
	callback mysql.ResultSpoolFn,
)

Source from the content-addressed store, hash-verified

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 }
58 if h != nil && h.provider != nil && h.provider.Pool() != nil && c != nil && expectedConn != nil {
59 pool := h.provider.Pool()
60 if expectedTx != nil {
61 // First honor the complete pair. If SessionEnd already removed the old
62 // transaction, the nil-transaction binding close below may retire the
63 // generic connection, but only if it is still idle and identical.
64 _ = pool.CloseConnIfBinding(c.ConnectionID, expectedConn, expectedTx)
65 _ = pool.CloseConnIfBinding(c.ConnectionID, expectedConn, nil)
66 } else {
67 // The nil transaction is part of the identity check. A replacement
68 // transaction admitted after the initial snapshot therefore blocks this
69 // close instead of being rolled back by an unconditional connection close.

Callers

nothing calls this directly

Calls 2

applyRequestModifiersFunction · 0.85
wrapResultCallbackFunction · 0.85

Tested by

no test coverage detected