Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ This variable is an alias for [`last_insert_id`](#last_insert_id).

> **Note:**
>
> This variable is read-only for [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential).
> This variable is read-only for [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential). Its effective value is controlled by TiDB Cloud.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Use active voice to improve clarity and readability, as recommended by the style guide.

Suggested change
> This variable is read-only for [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential). Its effective value is controlled by TiDB Cloud.
> This variable is read-only for [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential). TiDB Cloud controls its effective value.
References
  1. Avoid passive voice where active voice is clearer. (link)


- Scope: SESSION | GLOBAL
- Persists to cluster: Yes
Expand All @@ -661,6 +661,7 @@ This variable is an alias for [`last_insert_id`](#last_insert_id).
- The value should be an integer multiple of 1024. If the value is not divisible by 1024, a warning will be prompted and the value will be rounded down. For example, when the value is set to 1025, the actual value in TiDB is 1024.
- The maximum packet size allowed by the server and the client in one transmission of packets.
- In the `SESSION` scope, this variable is read-only.
- In Starter deployment mode, the effective value is configured by [`max-allowed-packet`](/tidb-configuration-file.md#max-allowed-packet-new-in-v900). TiDB uses the configured value when initializing sessions and when reporting the global `max_allowed_packet` value.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Use active voice and remove unnecessary words to improve the flow of the sentence.

Suggested change
- In Starter deployment mode, the effective value is configured by [`max-allowed-packet`](/tidb-configuration-file.md#max-allowed-packet-new-in-v900). TiDB uses the configured value when initializing sessions and when reporting the global `max_allowed_packet` value.
- In Starter deployment mode, [`max-allowed-packet`](/tidb-configuration-file.md#max-allowed-packet-new-in-v900) configures the effective value. TiDB uses this value when initializing sessions and reporting the global `max_allowed_packet` value.
References
  1. Avoid passive voice and unnecessary words. (link)

- This variable is compatible with MySQL.

### max_user_connections <span class="version-mark">New in v9.0.0</span>
Expand Down Expand Up @@ -889,6 +890,8 @@ mysql> SHOW GLOBAL VARIABLES LIKE 'max_prepared_stmt_count';
> **Note:**
>
> Currently, this variable is not supported on [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). DO **NOT** enable this variable for TiDB Cloud Dedicated clusters. Otherwise, you might get SQL client connection failures. This restriction is a temporary control measure and will be resolved in a future release.
>
> For [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), this variable is read-only and always returns `ON`.

- Scope: GLOBAL
- Persists to cluster: Yes
Expand All @@ -904,11 +907,11 @@ mysql> SHOW GLOBAL VARIABLES LIKE 'max_prepared_stmt_count';

<CustomContent platform="tidb-cloud">

- This variable ensures that all connections to TiDB are either on a local socket, or using TLS.
- For TiDB Cloud, secure connection behavior is managed by the service. For [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), this variable is exposed as `ON` and cannot be changed by SQL statements.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Use active voice to make the description more direct.

Suggested change
- For TiDB Cloud, secure connection behavior is managed by the service. For [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), this variable is exposed as `ON` and cannot be changed by SQL statements.
- For TiDB Cloud, the service manages secure connection behavior. For [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), this variable is exposed as `ON` and cannot be changed by SQL statements.
References
  1. Prefer active voice over passive voice. (link)


</CustomContent>

- Setting this variable to `ON` requires you to connect to TiDB from a session that has TLS enabled. This helps prevent lock-out scenarios when TLS is not configured correctly.
- For TiDB Self-Managed, setting this variable to `ON` requires you to connect to TiDB from a session that has TLS enabled. This helps prevent lock-out scenarios when TLS is not configured correctly.
- This setting was previously a `tidb.toml` option (`security.require-secure-transport`), but changed to a system variable starting from TiDB v6.1.0.
- Starting from v6.5.6, v7.1.2, v7.5.1, and v8.0.0, when Security Enhanced Mode (SEM) is enabled, setting this variable to `ON` is prohibited to avoid potential connectivity issues for users.

Expand Down
4 changes: 2 additions & 2 deletions tidb-cloud/limited-sql-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ TiDB Cloud works with almost all workloads that TiDB supports, but there are som
|:-|:-|:-|
| `datadir` | No limitation | Not supported [^1] |
| `interactive_timeout` | No limitation | Read-only [^10] |
| `max_allowed_packet` | No limitation | Read-only [^10] |
| `max_allowed_packet` | No limitation | Read-only; controlled by TiDB Cloud [^10] |
| `plugin_dir` | No limitation | Not supported [^8] |
| `plugin_load` | No limitation | Not supported [^8] |
| `require_secure_transport` | Not supported [^12] | Read-only [^10] |
| `require_secure_transport` | Not supported [^12] | Read-only and always `ON` [^10] |
| `skip_name_resolve` | No limitation | Read-only [^10] |
| `sql_log_bin` | No limitation | Read-only [^10] |
| `tidb_analyze_skip_column_types` | No limitation | Read-only [^10] |
Expand Down
11 changes: 10 additions & 1 deletion tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ The TiDB configuration file supports more options than command-line parameters.
+ Minimum value: `1`
+ Maximum value: `1048576`

### `max-allowed-packet` <span class="version-mark">New in v9.0.0</span>

+ Configures the effective value of [`max_allowed_packet`](/system-variables.md#max_allowed_packet-new-in-v610) in Starter deployment mode.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Use a noun phrase for the initial description of the configuration item to maintain consistency with other items in this file (e.g., token-limit, temp-dir).

Suggested change
+ Configures the effective value of [`max_allowed_packet`](/system-variables.md#max_allowed_packet-new-in-v610) in Starter deployment mode.
+ The effective value of [`max_allowed_packet`](/system-variables.md#max_allowed_packet-new-in-v610) in Starter deployment mode.

+ Default value: `67108864` (64 MiB)
+ Minimum value: `1024`
+ Maximum value: `1073741824`
+ The value must be an integer multiple of `1024`.
+ This configuration item takes effect only in Starter deployment mode. In other deployment modes, configure the packet size by using the `max_allowed_packet` system variable.

### `temp-dir` <span class="version-mark">New in v6.3.0</span>

+ File system location used by TiDB to store temporary data. If a feature requires local storage in TiDB nodes, TiDB stores the corresponding temporary data in this location.
Expand Down Expand Up @@ -521,7 +530,7 @@ Configuration items related to performance.
- The size limit of a single key-value record in a transaction. If the size limit is exceeded, TiDB returns the `entry too large` error. The maximum value of this configuration item does not exceed `125829120` (120 MB).
- Starting from v7.6.0, you can use the system variable [`tidb_txn_entry_size_limit`](/system-variables.md#tidb_txn_entry_size_limit-new-in-v760) to dynamically modify the value of this configuration item.
- Note that TiKV has a similar limit. If the data size of a single write request exceeds [`raft-entry-max-size`](/tikv-configuration-file.md#raft-entry-max-size), which is 8 MB by default, TiKV refuses to process this request. When a table has a row of large size, you need to modify both configurations at the same time.
- The default value of [`max_allowed_packet`](/system-variables.md#max_allowed_packet-new-in-v610) (the maximum size of a packet for the MySQL protocol) is 67108864 (64 MiB). If a row is larger than `max_allowed_packet`, the row gets truncated.
- The default value of [`max_allowed_packet`](/system-variables.md#max_allowed_packet-new-in-v610) (the maximum size of a packet for the MySQL protocol) is 67108864 (64 MiB). In Starter deployment mode, its effective value is configured by [`max-allowed-packet`](#max-allowed-packet-new-in-v900). If a row is larger than `max_allowed_packet`, the row gets truncated.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Use active voice to improve readability.

Suggested change
- The default value of [`max_allowed_packet`](/system-variables.md#max_allowed_packet-new-in-v610) (the maximum size of a packet for the MySQL protocol) is 67108864 (64 MiB). In Starter deployment mode, its effective value is configured by [`max-allowed-packet`](#max-allowed-packet-new-in-v900). If a row is larger than `max_allowed_packet`, the row gets truncated.
- The default value of [`max_allowed_packet`](/system-variables.md#max_allowed_packet-new-in-v610) (the maximum size of a packet for the MySQL protocol) is 67108864 (64 MiB). In Starter deployment mode, [`max-allowed-packet`](#max-allowed-packet-new-in-v900) configures its effective value. If a row is larger than `max_allowed_packet`, the row gets truncated.
References
  1. Avoid passive voice. (link)

- The default value of [`txn-total-size-limit`](#txn-total-size-limit) (the size limit of a single transaction in TiDB) is 100 MiB. If you increase the `txn-entry-size-limit` value to be over 100 MiB, you need to increase the `txn-total-size-limit` value accordingly.

### `txn-total-size-limit`
Expand Down
Loading