Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidb-configuration-file: add more notes to txn-entry-size-limit (#12595) #12645

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@ v5.0 后,用户仍可以单独修改以上系统变量(会有废弃警告)
>
> * [go-sql-driver](https://github.com/go-sql-driver/mysql#multistatements) (`multiStatements`)
> * [Connector/J](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html) (`allowMultiQueries`)
> * PHP [mysqli](https://dev.mysql.com/doc/apis-php/en/apis-php-mysqli.quickstart.multiple-statement.html) (`mysqli_multi_query`)
> * PHP [mysqli](https://www.php.net/manual/en/mysqli.quickstart.multiple-statement.php) (`mysqli_multi_query`)

### `tidb_enable_new_cost_interface`

Expand Down
2 changes: 2 additions & 0 deletions tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ TiDB 配置文件比命令行参数支持更多的选项。你可以在 [config/
+ 单位:Byte
+ 事务中单个 key-value 记录的大小限制。若超出该限制,TiDB 将会返回 `entry too large` 错误。该配置项的最大值不超过 `125829120`(表示 120MB)。
+ 注意,TiKV 有类似的限制。若单个写入请求的数据量大小超出 [`raft-entry-max-size`](/tikv-configuration-file.md#raft-entry-max-size),默认为 8MB,TiKV 会拒绝处理该请求。当表的一行记录较大时,需要同时修改这两个配置。
+ [`max_allowed_packet`](/system-variables.md#max_allowed_packet-从-v610-版本开始引入) (MySQL 协议的最大数据包大小) 的默认值为 `67108864`(64 MiB)。如果一行记录的大小超过 `max_allowed_packet`,该行记录会被截断。
+ [`txn-total-size-limit`](#txn-total-size-limit)(TiDB 单个事务大小限制)的默认值为 100 MiB。如果将 `txn-entry-size-limit` 的值设置为 100 MiB 以上,需要相应地调大 `txn-total-size-limit` 的值。

### `txn-total-size-limit`

Expand Down
14 changes: 7 additions & 7 deletions tidb-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,26 @@ title: TiDB 使用限制

## 单行的限制

| 类型 | 最大限制 |
| 类型 | 最大限制(默认值) |
|:----------|:----------|
| Size | 默认为 6MB,可通过 [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-从-v50-版本开始引入) 配置项调整 |
| Size | 默认为 6 MiB,可通过 [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-从-v50-版本开始引入) 配置项调至 120 MiB |

## 单列的限制

| 类型 | 最大限制 |
| 类型 | 最大限制(默认值) |
|:----------|:----------|
| Size | 6MB |
| Size | 默认为 6 MiB,可通过 [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-从-v50-版本开始引入) 配置项调至 120 MiB |

## 字符串类型限制
## 数据类型限制

| 类型 | 最大限制 |
|:----------|:----------|
| CHAR | 256 字符 |
| BINARY | 256 字节 |
| VARBINARY | 65535 字节 |
| VARCHAR | 16383 字符 |
| TEXT | 6MB 字节 |
| BLOB | 6MB 字节 |
| TEXT | 默认为 6291456 字节(即 6 MiB),可调至 125829120 字节(即 120 MiB) |
| BLOB | 默认为 6291456 字节(即 6 MiB),可调至 125829120 字节(即 120 MiB) |

## SQL Statements 的限制

Expand Down