Skip to content

Commit ba15c6e

Browse files
authored
statements: add privilege details (#21815)
1 parent 78c4089 commit ba15c6e

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

information-schema/information-schema-processlist.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,7 @@ SELECT * FROM information_schema.cluster_processlist;
152152
| 127.0.0.1:10080 | 1268776964 | root | 127.0.0.1:59922 | NULL | Query | 0 | autocommit | SELECT * FROM information_schema.cluster_processlist | b1e38e59fbbc3e2b35546db5c8053040db989a497ac6cd71ff8dd4394395701a | 0 | 0 | 07-29 12:39:24.282(451471727468740609) | default | | 0 | 0 | 0 |
153153
+-----------------+------------+------+-----------------+------+---------+------+------------+------------------------------------------------------+------------------------------------------------------------------+------+------+----------------------------------------+----------------+---------------+---------------+----------+----------+
154154
```
155+
156+
## Permissions
157+
158+
If the current user does not have the `PROCESS` privilege, `PROCESSLIST` only shows the requests from the user’s own sessions.

sql-statements/sql-statement-create-binding.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ Empty set (0.002 sec)
315315

316316
When you use `CREATE BINDING ... FROM HISTORY USING PLAN DIGEST`, the binding can fail if the SQL statement stored in [statement summary tables](/statement-summary-tables.md) for that digest is truncated because it is longer than [`tidb_stmt_summary_max_sql_length`](/system-variables.md#tidb_stmt_summary_max_sql_length-new-in-v40). In this case, you need to increase `tidb_stmt_summary_max_sql_length`.
317317

318+
## Permissions
319+
320+
The `CREATE BINDING` statement requires the `SUPER` privilege.
321+
318322
## MySQL compatibility
319323

320324
This statement is a TiDB extension to MySQL syntax.

sql-statements/sql-statement-show-processlist.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ aliases: ['/docs/dev/sql-statements/sql-statement-show-processlist/','/docs/dev/
66

77
# SHOW [FULL] PROCESSLIST
88

9-
This statement lists the current sessions connected to the same TiDB server. The `Info` column contains the query text, which will be truncated unless the optional keyword `FULL` is specified.
9+
This statement lists the current sessions connected to the same TiDB server. The `Info` column contains the query text, which will be truncated unless the optional keyword `FULL` is specified. To view the processlist across the entire cluster, use the [`INFORMATION_SCHEMA.CLUSTER_PROCESSLIST`](/information-schema/information-schema-processlist.md#cluster_processlist) table.
1010

1111
## Synopsis
1212

@@ -27,6 +27,10 @@ mysql> SHOW PROCESSLIST;
2727
1 rows in set (0.00 sec)
2828
```
2929

30+
## Permissions
31+
32+
If the current user does not have the `PROCESS` privilege, `SHOW PROCESSLIST` only shows the requests from the user’s own sessions.
33+
3034
## MySQL compatibility
3135

3236
* The `State` column in TiDB is non-descriptive. Representing state as a single value is more complex in TiDB, since queries are executed in parallel and each goroutine will have a different state at any one time.

0 commit comments

Comments
 (0)