Skip to content

Commit 7875e3c

Browse files
authored
statements: add privilege details (#21815) (#21860)
1 parent 38c02fb commit 7875e3c

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

information-schema/information-schema-processlist.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,7 @@ SELECT * FROM information_schema.cluster_processlist;
9999
| 10.0.1.21:10080 | 14 | u2 | 10.0.1.1 | test | Query | 0 | autocommit | select max(field0) from usertable | 496 | 05-28 03:54:21.230(416976223923077225) | default |
100100
+-----------------+-----+------+----------+------+---------+------+------------+------------------------------------------------------+-----+----------------------------------------+----------------+
101101
```
102+
103+
## Permissions
104+
105+
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
@@ -172,6 +172,10 @@ mysql> SELECT @@LAST_PLAN_FROM_BINDING;
172172

173173
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`.
174174

175+
## Permissions
176+
177+
The `CREATE BINDING` statement requires the `SUPER` privilege.
178+
175179
## MySQL compatibility
176180

177181
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
@@ -5,7 +5,7 @@ summary: An overview of the usage of SHOW [FULL] PROCESSLIST for the TiDB databa
55

66
# SHOW [FULL] PROCESSLIST
77

8-
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.
8+
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.
99

1010
## Synopsis
1111

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

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

3135
* 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)