From a6158fc91731502d7b200d319da6d0427dd70854 Mon Sep 17 00:00:00 2001 From: amyangfei Date: Wed, 1 Jul 2020 11:59:57 +0800 Subject: [PATCH] Remove fmt.Sprintf when assembling SQLs (#703) --- cdc/sink/mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdc/sink/mysql.go b/cdc/sink/mysql.go index f6e1fff5c9d..66603a58d37 100644 --- a/cdc/sink/mysql.go +++ b/cdc/sink/mysql.go @@ -694,7 +694,7 @@ func prepareReplace(schema, table string, cols map[string]*model.Column) (string func prepareDelete(schema, table string, cols map[string]*model.Column) (string, []interface{}, error) { var builder strings.Builder - builder.WriteString(fmt.Sprintf("DELETE FROM %s WHERE ", quotes.QuoteSchema(schema, table))) + builder.WriteString("DELETE FROM " + quotes.QuoteSchema(schema, table) + " WHERE") colNames, wargs := whereSlice(cols) args := make([]interface{}, 0, len(wargs))