Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#13949
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
ran-huang authored and ti-chi-bot committed Jun 21, 2023
1 parent d5e8a65 commit 73aad03
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
52 changes: 52 additions & 0 deletions data-type-string.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,41 @@ TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]

### `MEDIUMTEXT` type

<<<<<<< HEAD
The `MEDIUMTEXT` type is similar to the [`TEXT` type](#text-type). The difference is that the maximum column length of `MEDIUMTEXT` is 16,777,215.
=======
<CustomContent platform="tidb">

The `MEDIUMTEXT` type is similar to the [`TEXT` type](#text-type). The difference is that the maximum column length of `MEDIUMTEXT` is 16,777,215. But due to the limitation of [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-new-in-v50), the maximum storage size of a single row in TiDB is 6 MiB by default and can be increased to 120 MiB by changing the configuration.

</CustomContent>
<CustomContent platform="tidb-cloud">

The `MEDIUMTEXT` type is similar to the [`TEXT` type](#text-type). The difference is that the maximum column length of `MEDIUMTEXT` is 16,777,215. But due to the limitation of [`txn-entry-size-limit`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#txn-entry-size-limit-new-in-v50), the maximum storage size of a single row in TiDB is 6 MiB by default and can be increased to 120 MiB by changing the configuration.

</CustomContent>
>>>>>>> 5bdc60885 (*: remove the limit on single column data size (#13949))
```sql
MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
```

### `LONGTEXT` type

<<<<<<< HEAD
The `LONGTEXT` type is similar to the [`TEXT` type](#text-type). The difference is that the maximum column length of `LONGTEXT` is 4,294,967,295. But due to the [Limitation on a single column in TiDB](/tidb-limitations.md#limitation-on-a-single-column), the maximum storage size of a single column in TiDB is 6 MB.
=======
<CustomContent platform="tidb">

The `LONGTEXT` type is similar to the [`TEXT` type](#text-type). The difference is that the maximum column length of `LONGTEXT` is 4,294,967,295. But due to the limitation of [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-new-in-v50), the maximum storage size of a single row in TiDB is 6 MiB by default and can be increased to 120 MiB by changing the configuration.

</CustomContent>
<CustomContent platform="tidb-cloud">

The `LONGTEXT` type is similar to the [`TEXT` type](#text-type). The difference is that the maximum column length of `LONGTEXT` is 4,294,967,295. But due to the limitation of [`txn-entry-size-limit`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#txn-entry-size-limit-new-in-v50), the maximum storage size of a single row in TiDB is 6 MiB by default and can be increased to 120 MiB by changing the configuration.

</CustomContent>
>>>>>>> 5bdc60885 (*: remove the limit on single column data size (#13949))
```sql
LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
Expand Down Expand Up @@ -101,15 +127,41 @@ TINYBLOB

### `MEDIUMBLOB` type

<<<<<<< HEAD
The `MEDIUMBLOB` type is similar to the [`BLOB` type](#blob-type). The difference is that the maximum column length of `MEDIUMBLOB` is 16,777,215.
=======
<CustomContent platform="tidb">

The `MEDIUMBLOB` type is similar to the [`BLOB` type](#blob-type). The difference is that the maximum column length of `MEDIUMBLOB` is 16,777,215. But due to the limitation of [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-new-in-v50), the maximum storage size of a single row in TiDB is 6 MiB by default and can be increased to 120 MiB by changing the configuration.

</CustomContent>
<CustomContent platform="tidb-cloud">

The `MEDIUMBLOB` type is similar to the [`BLOB` type](#blob-type). The difference is that the maximum column length of `MEDIUMBLOB` is 16,777,215. But due to the limitation of [`txn-entry-size-limit`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#txn-entry-size-limit-new-in-v50), the maximum storage size of a single row in TiDB is 6 MiB by default and can be increased to 120 MiB by changing the configuration.

</CustomContent>
>>>>>>> 5bdc60885 (*: remove the limit on single column data size (#13949))
```sql
MEDIUMBLOB
```

### `LONGBLOB` type

<<<<<<< HEAD
The `LONGBLOB` type is similar to the [`BLOB` type](#blob-type). The difference is that the maximum column length of `LONGBLOB` is 4,294,967,295. But due to the [Limitation on a single column in TiDB](/tidb-limitations.md#limitation-on-a-single-column), the maximum storage size of a single column in TiDB is 6 MB.
=======
<CustomContent platform="tidb">

The `LONGBLOB` type is similar to the [`BLOB` type](#blob-type). The difference is that the maximum column length of `LONGBLOB` is 4,294,967,295. But due to the limitation of [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-new-in-v50), the maximum storage size of a single row in TiDB is 6 MiB by default and can be increased to 120 MiB by changing the configuration.

</CustomContent>
<CustomContent platform="tidb-cloud">

The `LONGBLOB` type is similar to the [`BLOB` type](#blob-type). The difference is that the maximum column length of `LONGBLOB` is 4,294,967,295. But due to the limitation of [`txn-entry-size-limit`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#txn-entry-size-limit-new-in-v50), the maximum storage size of a single row in TiDB is 6 MiB by default and can be increased to 120 MiB by changing the configuration.

</CustomContent>
>>>>>>> 5bdc60885 (*: remove the limit on single column data size (#13949))
```sql
LONGBLOB
Expand Down
4 changes: 4 additions & 0 deletions tidb-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@ This document describes the common usage limitations of TiDB, including the maxi
|:----------|:----------|
| Size | 6 MB by default. You can adjust the size limit via the [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-new-in-v50) configuration item. |

<<<<<<< HEAD
## Limitation on a single column

| Type | Upper limit |
|:----------|:----------|
| Size | 6 MB |

## Limitations on string types
=======
## Limitations on data types
>>>>>>> 5bdc60885 (*: remove the limit on single column data size (#13949))
| Type | Upper limit |
|:----------|:----------|
Expand Down

0 comments on commit 73aad03

Please sign in to comment.