Skip to content

Commit

Permalink
ddl: fix DDL schedule bug (#38347)
Browse files Browse the repository at this point in the history
close #38177
  • Loading branch information
xiongjiwei committed Oct 10, 2022
1 parent 8afb7c8 commit 7a7ed3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ddl/job_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (d *ddl) getReorgJob(sess *session) (*model.Job, error) {
// Check if there is any block ddl running, like drop schema and flashback cluster.
sql := fmt.Sprintf("select job_id from mysql.tidb_ddl_job where "+
"(CONCAT(',', schema_ids, ',') REGEXP CONCAT(',', %s, ',') != 0 and type = %d and processing) "+
"or (CONCAT(',', schema_ids, ',') REGEXP CONCAT(',', %s, ',') != 0 and processing) "+
"or (CONCAT(',', table_ids, ',') REGEXP CONCAT(',', %s, ',') != 0 and processing) "+
"or (type = %d and processing) limit 1",
strconv.Quote(strconv.FormatInt(job.SchemaID, 10)), model.ActionDropSchema, strconv.Quote(strconv.FormatInt(job.TableID, 10)), model.ActionFlashbackCluster)
return d.checkJobIsRunnable(sess, sql)
Expand Down

0 comments on commit 7a7ed3d

Please sign in to comment.