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

Function TestInterpolateParamsTooManyPlaceholders

connection_test.go:68–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

66}
67
68func TestInterpolateParamsTooManyPlaceholders(t *testing.T) {
69 mc := &mysqlConn{
70 buf: newBuffer(),
71 maxAllowedPacket: maxPacketSize,
72 cfg: &Config{
73 InterpolateParams: true,
74 },
75 }
76
77 q, err := mc.interpolateParams("SELECT ?+?", []driver.Value{int64(42)})
78 if err != driver.ErrSkip {
79 t.Errorf("Expected err=driver.ErrSkip, got err=%#v, q=%#v", err, q)
80 }
81}
82
83func TestInterpolateParamsUint64(t *testing.T) {
84 mc := &mysqlConn{

Callers

nothing calls this directly

Calls 2

interpolateParamsMethod · 0.95
newBufferFunction · 0.85

Tested by

no test coverage detected