Skip to content

Commit

Permalink
Remove fmt.Sprintf when assembling SQLs (pingcap#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei authored Jul 1, 2020
1 parent 439e717 commit a6158fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cdc/sink/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a6158fc

Please sign in to comment.