ADMIN CANCEL DDL
The ADMIN CANCEL DDL
statement allows you to cancel a running DDL job. The job_id
can be found by running ADMIN SHOW DDL JOBS
.
Synopsis
- AdminStmt
- NumList
AdminStmt ::=
'ADMIN' ( 'SHOW' ( 'DDL' ( 'JOBS' Int64Num? WhereClauseOptional | 'JOB' 'QUERIES' NumList )? | TableName 'NEXT_ROW_ID' | 'SLOW' AdminShowSlow ) | 'CHECK' ( 'TABLE' TableNameList | 'INDEX' TableName Identifier ( HandleRange ( ',' HandleRange )* )? ) | 'RECOVER' 'INDEX' TableName Identifier | 'CLEANUP' ( 'INDEX' TableName Identifier | 'TABLE' 'LOCK' TableNameList ) | 'CHECKSUM' 'TABLE' TableNameList | 'CANCEL' 'DDL' 'JOBS' NumList | 'RELOAD' ( 'EXPR_PUSHDOWN_BLACKLIST' | 'OPT_RULE_BLACKLIST' | 'BINDINGS' ) | 'PLUGINS' ( 'ENABLE' | 'DISABLE' ) PluginNameList | 'REPAIR' 'TABLE' TableName CreateTableStmt | ( 'FLUSH' | 'CAPTURE' | 'EVOLVE' ) 'BINDINGS' )
NumList ::=
Int64Num ( ',' Int64Num )*
Examples
To cancel the currently running DDL jobs and return whether the corresponding jobs are successfully cancelled, use ADMIN CANCEL DDL JOBS
:
ADMIN CANCEL DDL JOBS job_id [, job_id] ...;
If the operation fails to cancel the jobs, specific reasons are displayed.
MySQL compatibility
This statement is a TiDB extension to MySQL syntax.