Skip to content

Commit

Permalink
admin show ddl: Fix EBNF (#18153) (#18254)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jul 16, 2024
1 parent cf41b7b commit a083f82
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions sql-statements/sql-statement-admin-show-ddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 )*
Expand All @@ -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;
Expand Down

0 comments on commit a083f82

Please sign in to comment.