Skip to content

Commit

Permalink
This is an automated cherry-pick of #16981
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
Oreoxmt authored and ti-chi-bot committed Apr 7, 2024
1 parent 56cf013 commit ec35290
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 1 deletion.
34 changes: 34 additions & 0 deletions sql-statements/sql-statement-show-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ summary: TiDB 数据库中 SHOW [GLOBAL|SESSION] STATUS 的使用概况。
```ebnf+diagram
ShowStatusStmt ::=
'SHOW' Scope? 'STATUS' ShowLikeOrWhere?
<<<<<<< HEAD
Scope ::=
( 'GLOBAL' | 'SESSION' )
=======
Scope ::=
( 'GLOBAL' | 'SESSION' )
>>>>>>> 8b28181054 (Update SHOW STATUS docs (#16981))
ShowLikeOrWhere ::=
"LIKE" SimpleExpr
| "WHERE" Expression
Expand All @@ -26,6 +33,7 @@ ShowLikeOrWhere ::=
```sql
SHOW SESSION STATUS;
```
<<<<<<< HEAD

```
+-------------------------------+--------------------------------------+
Expand Down Expand Up @@ -53,6 +61,32 @@ SHOW GLOBAL STATUS;
```

```
=======
```sql
+-------------------------------+--------------------------------------+
| Variable_name | Value |
+-------------------------------+--------------------------------------+
| Ssl_cipher | |
| Ssl_cipher_list | |
| Ssl_server_not_after | |
| Ssl_server_not_before | |
| Ssl_verify_mode | 0 |
| Ssl_version | |
| Uptime | 1409 |
| ddl_schema_version | 116 |
| last_plan_binding_update_time | 0000-00-00 00:00:00 |
| server_id | 61160e73-ab80-40ff-8f33-27d55d475fd1 |
+-------------------------------+--------------------------------------+
10 rows in set (0.00 sec)
```

```sql
SHOW GLOBAL STATUS;
```

```sql
>>>>>>> 8b28181054 (Update SHOW STATUS docs (#16981))
+-----------------------+--------------------------------------+
| Variable_name | Value |
+-----------------------+--------------------------------------+
Expand Down
55 changes: 54 additions & 1 deletion status-variables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
title: 服务器状态变量
<<<<<<< HEAD
summary: 使用状态变量查看系统和会话状态
=======
summary: 使用状态变量查看系统和会话状态。
>>>>>>> 8b28181054 (Update SHOW STATUS docs (#16981))
---

# 服务器状态变量
Expand All @@ -13,6 +17,7 @@ summary: 使用状态变量查看系统和会话状态

## 变量参考

<<<<<<< HEAD
### Compression

- 作用域:SESSION
Expand All @@ -31,17 +36,27 @@ summary: 使用状态变量查看系统和会话状态
- 类型:整数型
- MySQL 协议使用的压缩等级。

=======
>>>>>>> 8b28181054 (Update SHOW STATUS docs (#16981))
### Ssl_cipher

- 作用域:SESSION | GLOBAL
- 类型:字符串
<<<<<<< HEAD
- 正在使用的 TLS 加密套件.
=======
- 正在使用的 TLS 加密套件。
>>>>>>> 8b28181054 (Update SHOW STATUS docs (#16981))
### Ssl_cipher_list

- 作用域:SESSION | GLOBAL
- 类型:字符串
<<<<<<< HEAD
- 服务器支持的 TLS 加密套件列表.
=======
- 服务器支持的 TLS 加密套件列表。
>>>>>>> 8b28181054 (Update SHOW STATUS docs (#16981))
### Ssl_server_not_after

Expand Down Expand Up @@ -79,7 +94,11 @@ summary: 使用状态变量查看系统和会话状态
- 类型:整数型
- DDL schema 使用的版本。

<<<<<<< HEAD
### last_plan_binding_update_time <span class="version-mark">New in v5.2.0</span>
=======
### last_plan_binding_update_time <span class="version-mark">从 v5.2.0 版本开始引入</span>
>>>>>>> 8b28181054 (Update SHOW STATUS docs (#16981))
- 作用域:SESSION
- 类型:时间戳
Expand All @@ -89,4 +108,38 @@ summary: 使用状态变量查看系统和会话状态

- 作用域:SESSION | GLOBAL
- 类型:字符串
- 服务器的通用唯一识别码 (UUID)。
<<<<<<< HEAD
- 服务器的通用唯一识别码 (UUID)。
=======
- 服务器的通用唯一识别码 (UUID)。

### tidb_gc_last_run_time

- 作用域:SESSION | GLOBAL
- 类型:字符串
- 最近一次运行[垃圾回收 (GC)](/garbage-collection-overview.md) 的时间戳。

### tidb_gc_leader_desc

- 作用域:SESSION | GLOBAL
- 类型:字符串
- [GC](/garbage-collection-overview.md) leader 的相关信息,包括主机名和进程 ID (PID)。

### tidb_gc_leader_lease

- 作用域:SESSION | GLOBAL
- 类型:字符串
- [GC](/garbage-collection-overview.md) leader 的租约时间戳。

### tidb_gc_leader_uuid

- 作用域:SESSION | GLOBAL
- 类型:字符串
- [GC](/garbage-collection-overview.md) leader 的 UUID。

### tidb_gc_safe_point

- 作用域:SESSION | GLOBAL
- 类型:字符串
- [GC](/garbage-collection-overview.md) safe point 的时间戳。
>>>>>>> 8b28181054 (Update SHOW STATUS docs (#16981))

0 comments on commit ec35290

Please sign in to comment.