|
|
@@ -49,6 +49,7 @@ func TestInterpolateParamsTooManyPlaceholders(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
// We don't support placeholder in string literal for now.
|
|
|
+// https://github.com/go-sql-driver/mysql/pull/490
|
|
|
func TestInterpolateParamsPlaceholderInString(t *testing.T) {
|
|
|
mc := &mysqlConn{
|
|
|
buf: newBuffer(nil),
|
|
|
@@ -59,6 +60,7 @@ func TestInterpolateParamsPlaceholderInString(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
q, err := mc.interpolateParams("SELECT 'abc?xyz',?", []driver.Value{int64(42)})
|
|
|
+ // When InterpolateParams support string literal, this should return `"SELECT 'abc?xyz', 42`
|
|
|
if err != driver.ErrSkip {
|
|
|
t.Errorf("Expected err=driver.ErrSkip, got err=%#v, q=%#v", err, q)
|
|
|
}
|