Skip to content

Commit

Permalink
fix: correct SQL argument handling in Get method of MySQLReplicateSto…
Browse files Browse the repository at this point in the history
…re (#177)
  • Loading branch information
SimFG authored Feb 19, 2025
1 parent cb90bff commit e1f76f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/store/mysql_replicate_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ func (s *MySQLReplicateStore) Get(ctx context.Context, key string, withPrefix bo
sqlStr = fmt.Sprintf("SELECT task_msg_value FROM task_msg WHERE task_msg_key LIKE '%s%%'", taskMsgKey)
} else {
sqlStr = "SELECT task_msg_value FROM task_msg WHERE task_msg_key = ?"
sqlArgs = append(sqlArgs, taskMsgKey)
}
sqlArgs = append(sqlArgs, taskMsgKey)

rows, err := s.db.QueryContext(ctx, sqlStr, sqlArgs...)
if err != nil {
Expand Down

0 comments on commit e1f76f9

Please sign in to comment.