Skip to content

Commit

Permalink
tidb-configuration-file: add more notes to txn-entry-size-limit (ping…
Browse files Browse the repository at this point in the history
  • Loading branch information
TomShawn authored and ti-chi-bot committed Jan 11, 2023
1 parent e4f04d7 commit 3c70f7e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,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` <span class="version-mark">从 v6.2.0 版本开始引入</span>

Expand Down
2 changes: 2 additions & 0 deletions tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,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

0 comments on commit 3c70f7e

Please sign in to comment.