Skip to content

Commit

Permalink
ttl: remove useless function in TTL (pingcap#55546)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangKeao authored Aug 21, 2024
1 parent 38f9d70 commit d37cac5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/ttl/ttlworker/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"go.uber.org/zap"
)

const updateJobCurrentStatusTemplate = "UPDATE mysql.tidb_ttl_table_status SET current_job_status = %? WHERE table_id = %? AND current_job_status = %? AND current_job_id = %?"
const finishJobTemplate = `UPDATE mysql.tidb_ttl_table_status
SET last_job_id = current_job_id,
last_job_start_time = current_job_start_time,
Expand Down Expand Up @@ -68,10 +67,6 @@ const finishJobHistoryTemplate = `UPDATE mysql.tidb_ttl_job_history
status = %?
WHERE job_id = %?`

func updateJobCurrentStatusSQL(tableID int64, oldStatus cache.JobStatus, newStatus cache.JobStatus, jobID string) (string, []any) {
return updateJobCurrentStatusTemplate, []any{string(newStatus), tableID, string(oldStatus), jobID}
}

func finishJobSQL(tableID int64, finishTime time.Time, summary string, jobID string) (string, []any) {
return finishJobTemplate, []any{finishTime.Format(timeFormat), summary, tableID, jobID}
}
Expand Down

0 comments on commit d37cac5

Please sign in to comment.