From 29285d8883cb61a18c490d872ef1c183e8abc99c Mon Sep 17 00:00:00 2001 From: doc-claw-bot Date: Thu, 22 Oct 2026 01:20:56 +0000 Subject: [PATCH 1/3] docs: clarify large-value type limits in limitations --- tidb-limitations.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tidb-limitations.md b/tidb-limitations.md index e04d9cf13f4cd..32d2e392b0661 100644 --- a/tidb-limitations.md +++ b/tidb-limitations.md @@ -87,6 +87,15 @@ You can adjust this limit using the [`max-index-length`](/tidb-configuration-fil | VARCHAR | 16383 characters | | TEXT | 65535 bytes | | BLOB | 65535 bytes | +| MEDIUMTEXT | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | +| LONGTEXT | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | +| MEDIUMBLOB | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | +| LONGBLOB | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | +| JSON | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | + +> **Note:** +> +> The `TEXT` and `BLOB` limits in the preceding table match the corresponding MySQL type limits. To store values larger than 65,535 bytes, use `MEDIUMTEXT`, `LONGTEXT`, `MEDIUMBLOB`, or `LONGBLOB`. The size of `JSON` values is also bounded by the single-row size limit. ## Limitations on SQL statements From bc5183094b78d941279514ebf84dca54455ea4e3 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 22 Oct 2026 11:08:23 +0800 Subject: [PATCH 2/3] Update tidb-limitations.md --- tidb-limitations.md | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tidb-limitations.md b/tidb-limitations.md index 32d2e392b0661..fbf315882707e 100644 --- a/tidb-limitations.md +++ b/tidb-limitations.md @@ -79,23 +79,24 @@ You can adjust this limit using the [`max-index-length`](/tidb-configuration-fil ## Limitations on data types -| Type | Upper limit | -|:----------|:----------| -| CHAR | 255 characters | -| BINARY | 255 bytes | -| VARBINARY | 65535 bytes | -| VARCHAR | 16383 characters | -| TEXT | 65535 bytes | -| BLOB | 65535 bytes | -| MEDIUMTEXT | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | -| LONGTEXT | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | -| MEDIUMBLOB | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | -| LONGBLOB | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | -| JSON | Single-row size limit: 6 MiB by default, adjustable to 120 MiB via `txn-entry-size-limit` | - > **Note:** > -> The `TEXT` and `BLOB` limits in the preceding table match the corresponding MySQL type limits. To store values larger than 65,535 bytes, use `MEDIUMTEXT`, `LONGTEXT`, `MEDIUMBLOB`, or `LONGBLOB`. The size of `JSON` values is also bounded by the single-row size limit. +> - The `TEXT` and `BLOB` limits match the corresponding MySQL type limits. To store values larger than 65,535 bytes, use `MEDIUMTEXT`, `LONGTEXT`, `MEDIUMBLOB`, or `LONGBLOB`. +> - The single-row size limit applies to the entire row and can be adjusted using [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-new-in-v4010-and-v500). + +| Type | Maximum size for a single value | Single-row size limit | +|:-----------|:--------------------------------|:----------------------| +| CHAR | 255 characters | 6 MiB by default, adjustable to 120 MiB | +| BINARY | 255 bytes | 6 MiB by default, adjustable to 120 MiB | +| VARBINARY | 65,535 bytes | 6 MiB by default, adjustable to 120 MiB | +| VARCHAR | 16,383 characters (utf8mb4) | 6 MiB by default, adjustable to 120 MiB | +| TEXT | 65,535 bytes | 6 MiB by default, adjustable to 120 MiB | +| BLOB | 65,535 bytes | 6 MiB by default, adjustable to 120 MiB | +| MEDIUMTEXT | 16,777,215 bytes | 6 MiB by default, adjustable to 120 MiB | +| LONGTEXT | 4,294,967,295 bytes | 6 MiB by default, adjustable to 120 MiB | +| MEDIUMBLOB | 16,777,215 bytes | 6 MiB by default, adjustable to 120 MiB | +| LONGBLOB | 4,294,967,295 bytes | 6 MiB by default, adjustable to 120 MiB | +| JSON | Not separately specified | 6 MiB by default, adjustable to 120 MiB | ## Limitations on SQL statements From 9c080ba171f692779c381b5c4b8b4128f9aa26d2 Mon Sep 17 00:00:00 2001 From: qiancai Date: Thu, 19 Nov 2026 20:24:45 +0800 Subject: [PATCH 3/3] Update tidb-limitations.md --- tidb-limitations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tidb-limitations.md b/tidb-limitations.md index fbf315882707e..3e5c802a6de19 100644 --- a/tidb-limitations.md +++ b/tidb-limitations.md @@ -82,9 +82,9 @@ You can adjust this limit using the [`max-index-length`](/tidb-configuration-fil > **Note:** > > - The `TEXT` and `BLOB` limits match the corresponding MySQL type limits. To store values larger than 65,535 bytes, use `MEDIUMTEXT`, `LONGTEXT`, `MEDIUMBLOB`, or `LONGBLOB`. -> - The single-row size limit applies to the entire row and can be adjusted using [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-new-in-v4010-and-v500). +> - Each value must fit within the size limit for its data type, and the entire row must fit within the single-row size limit. You can adjust the single-row size limit using [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-new-in-v4010-and-v500). -| Type | Maximum size for a single value | Single-row size limit | +| Type | Data type limit | Single-row size limit | |:-----------|:--------------------------------|:----------------------| | CHAR | 255 characters | 6 MiB by default, adjustable to 120 MiB | | BINARY | 255 bytes | 6 MiB by default, adjustable to 120 MiB |