diff --git a/sql-statements/sql-statement-admin-show-ddl.md b/sql-statements/sql-statement-admin-show-ddl.md index 1d829f8184cc1..4ee9f0f3069ef 100644 --- a/sql-statements/sql-statement-admin-show-ddl.md +++ b/sql-statements/sql-statement-admin-show-ddl.md @@ -10,8 +10,13 @@ The `ADMIN SHOW DDL [JOBS|JOB QUERIES]` statement shows information about runnin ## Synopsis ```ebnf+diagram -AdminStmt ::= - 'ADMIN' ( 'SHOW' ( 'DDL' ( 'JOBS' Int64Num? WhereClauseOptional | 'JOB' 'QUERIES' NumList | 'JOB' 'QUERIES' 'LIMIT' m 'OFFSET' n )? | 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' ) +AdminShowDDLStmt ::= + 'ADMIN' 'SHOW' 'DDL' + ( + 'JOBS' Int64Num? WhereClauseOptional + | 'JOB' 'QUERIES' NumList + | 'JOB' 'QUERIES' 'LIMIT' m ( ('OFFSET' | ',') n )? + )? NumList ::= Int64Num ( ',' Int64Num )* @@ -26,7 +31,12 @@ WhereClauseOptional ::= To view the status of the currently running DDL jobs, use `ADMIN SHOW DDL`. The output includes the current schema version, the DDL ID and address of the owner, the running DDL jobs and SQL statements, and the DDL ID of the current TiDB instance. -{{< copyable "sql" >}} +- `SCHEMA_VER`: a number indicating the version of the schema. +- `OWNER_ID`: the UUID of the DDL owner. See also [`TIDB_IS_DDL_OWNER()`](/functions-and-operators/tidb-functions.md). +- `OWNER_ADDRESS`: the IP address of the DDL owner. +- `RUNNING_JOBS`: details about the running DDL job. +- `SELF_ID`: the UUID of the TiDB node to which you are currently connected. If `SELF_ID` is the same as the `OWNER_ID`, it means that you are connected to the DDL owner. +- `QUERY`: the statements of the queries. ```sql ADMIN SHOW DDL;