MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / handleStmtReset

Method handleStmtReset

IceFireDB-SQLProxy/pkg/mysql/server/stmt.go:326–342  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

324}
325
326func (c *Conn) handleStmtReset(data []byte) (*Result, error) {
327 if len(data) < 4 {
328 return nil, ErrMalformPacket
329 }
330
331 id := binary.LittleEndian.Uint32(data[0:4])
332
333 s, ok := c.stmts[id]
334 if !ok {
335 return nil, NewDefaultError(ER_UNKNOWN_STMT_HANDLER,
336 strconv.FormatUint(uint64(id), 10), "stmt_reset")
337 }
338
339 s.ResetParams()
340
341 return &Result{}, nil
342}
343
344// stmt close command has no response
345func (c *Conn) handleStmtClose(data []byte) error {

Callers 1

dispatchMethod · 0.95

Calls 2

NewDefaultErrorFunction · 0.50
ResetParamsMethod · 0.45

Tested by

no test coverage detected