From 6e9773e0760d2cf8eeed792c5b9cf6cef2ef2bdf Mon Sep 17 00:00:00 2001 From: yibin Date: Mon, 13 Apr 2026 10:33:42 +0800 Subject: [PATCH 1/4] This is an automated cherry-pick of #22508 Signed-off-by: ti-chi-bot --- system-variables.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/system-variables.md b/system-variables.md index dd168da0d23e5..e7c60a5ae2034 100644 --- a/system-variables.md +++ b/system-variables.md @@ -588,6 +588,10 @@ This variable is an alias for [`last_insert_id`](#last_insert_id). - Unit: Seconds - The lock wait timeout for pessimistic transactions (default). +### InPacketBytes New in v8.5.6 and v9.0.0 + +- This variable is used only for internal statistics and is not visible to users. + ### interactive_timeout > **Note:** @@ -657,6 +661,25 @@ This variable is an alias for [`last_insert_id`](#last_insert_id). - In the `SESSION` scope, this variable is read-only. - This variable is compatible with MySQL. +<<<<<<< HEAD +======= +### max_user_connections New in v9.0.0 + +- Scope: GLOBAL +- Persists to cluster: Yes +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No +- Type: Integer +- Default value: `0` +- Range: `[0, 100000]` +- This variable controls the maximum number of connections a user can establish to a TiDB server instance. It is used for resource control. +- The default value `0` means there is no limit for user connections. When the value is greater than `0` and the number of user connections reaches this value, the TiDB server will reject the user's new connection. +- If the value of this variable exceeds [`max_connections`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#max_connections), TiDB uses `max_connections` to limit the maximum number of connections a single user can establish. For example, if `max_user_connections` of a user is set to `2000`, but `max_connections` is `1000`, the user can actually establish up to `1000` connections to a TiDB server instance. + +### OutPacketBytes New in v8.5.6 and v9.0.0 + +- This variable is used only for internal statistics and is not visible to users. + +>>>>>>> 6334b03d72 (Add two internal session variable info: InPacketBytes, OutPacketBytes (#22508)) ### password_history New in v6.5.0 - Scope: GLOBAL From e76acc6d695b6517d1e633519bd0b595f1790479 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 13 Apr 2026 13:59:05 +0800 Subject: [PATCH 2/4] Update system-variables.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- system-variables.md | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/system-variables.md b/system-variables.md index e7c60a5ae2034..f7ca1abed30ea 100644 --- a/system-variables.md +++ b/system-variables.md @@ -661,25 +661,10 @@ This variable is an alias for [`last_insert_id`](#last_insert_id). - In the `SESSION` scope, this variable is read-only. - This variable is compatible with MySQL. -<<<<<<< HEAD -======= -### max_user_connections New in v9.0.0 - -- Scope: GLOBAL -- Persists to cluster: Yes -- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No -- Type: Integer -- Default value: `0` -- Range: `[0, 100000]` -- This variable controls the maximum number of connections a user can establish to a TiDB server instance. It is used for resource control. -- The default value `0` means there is no limit for user connections. When the value is greater than `0` and the number of user connections reaches this value, the TiDB server will reject the user's new connection. -- If the value of this variable exceeds [`max_connections`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#max_connections), TiDB uses `max_connections` to limit the maximum number of connections a single user can establish. For example, if `max_user_connections` of a user is set to `2000`, but `max_connections` is `1000`, the user can actually establish up to `1000` connections to a TiDB server instance. - ### OutPacketBytes New in v8.5.6 and v9.0.0 -- This variable is used only for internal statistics and is not visible to users. +- This variable is used only for internal statistics and is not visible to you. ->>>>>>> 6334b03d72 (Add two internal session variable info: InPacketBytes, OutPacketBytes (#22508)) ### password_history New in v6.5.0 - Scope: GLOBAL From 40e53a3c03e733009c56b344cc970a2cb17b10f7 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 13 Apr 2026 13:59:29 +0800 Subject: [PATCH 3/4] Update system-variables.md --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index f7ca1abed30ea..24eb1ce21b219 100644 --- a/system-variables.md +++ b/system-variables.md @@ -663,7 +663,7 @@ This variable is an alias for [`last_insert_id`](#last_insert_id). ### OutPacketBytes New in v8.5.6 and v9.0.0 -- This variable is used only for internal statistics and is not visible to you. +- This variable is used only for internal statistics and is not visible to users. ### password_history New in v6.5.0 From b67098840248707b44adc53f71d1f9f7c24e88eb Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 13 Apr 2026 14:00:12 +0800 Subject: [PATCH 4/4] remove the info about v9.0.0 --- system-variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-variables.md b/system-variables.md index 24eb1ce21b219..c527266a099c9 100644 --- a/system-variables.md +++ b/system-variables.md @@ -588,7 +588,7 @@ This variable is an alias for [`last_insert_id`](#last_insert_id). - Unit: Seconds - The lock wait timeout for pessimistic transactions (default). -### InPacketBytes New in v8.5.6 and v9.0.0 +### InPacketBytes New in v8.5.6 - This variable is used only for internal statistics and is not visible to users. @@ -661,7 +661,7 @@ This variable is an alias for [`last_insert_id`](#last_insert_id). - In the `SESSION` scope, this variable is read-only. - This variable is compatible with MySQL. -### OutPacketBytes New in v8.5.6 and v9.0.0 +### OutPacketBytes New in v8.5.6 - This variable is used only for internal statistics and is not visible to users.