Skip to content

Commit

Permalink
add description about limitation (#18774) (#18835)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Oct 15, 2024
1 parent d7bebf2 commit 1f03bb9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sql-statements/sql-statement-change-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ summary: TiDB 数据库中 CHANGE COLUMN 的使用概况。

从 v5.1.0 版本起,TiDB 开始支持 Reorg 数据的类型变更,包括但不限于:

- 从 varchar 转换为 bigint
- 从 varchar 转换为 bigint
- decimal 精度修改
- 从 varchar(10) 到 varchar(5) 的长度压缩

Expand Down Expand Up @@ -151,7 +151,7 @@ ERROR 8200 (HY000): Unsupported modify column: change from original type decimal
* 不支持主键列上 [Reorg-Data](/sql-statements/sql-statement-modify-column.md#reorg-data-change) 类型的变更。
* 不支持分区表上的列类型变更。
* 不支持生成列上的列类型变更。
* 不支持部分数据类型(例如,部分时间类型、Bit、Set、Enum、JSON 等)的变更,因为 TiDB `CAST` 函数与 MySQL 的行为存在兼容性问题。
* 不支持部分数据类型(例如,部分 TIME 类型、BIT、SET、ENUM、JSON 等)向某些类型的变更,因为 TiDB `CAST` 函数与 MySQL 的行为存在兼容性问题。

## 另请参阅

Expand Down
2 changes: 1 addition & 1 deletion sql-statements/sql-statement-modify-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ CREATE TABLE `t1` (
ERROR 8200 (HY000): Unsupported modify column: table is partition table
```

* 不支持部分数据类型(例如,部分时间类型、BitSet、Enum、JSON 等)的变更,因为 TiDB cast 函数与 MySQL 的行为有一些兼容性问题。例如:
* 不支持部分数据类型(例如,部分 TIME 类型、BITSET、ENUM、JSON 等)向某些类型的变更,因为 TiDB `CAST` 函数与 MySQL 的行为有一些兼容性问题。例如:

```sql
CREATE TABLE t (a DECIMAL(13, 7));
Expand Down
4 changes: 4 additions & 0 deletions tidb-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ summary: TiDB 中的使用限制包括标识符长度限制、数据库、表、

本文会将详细描述 TiDB 中常见的使用限制,包括:标识符长度,最大支持的数据库、表、索引、分区表、序列等的个数。

> **注意:**
>
> TiDB 高度兼容 MySQL 协议,也兼容了很多 MySQL 本身的限制,比如单个索引最多可包含 16 列。详细请参考[与 MySQL 兼容性对比](/mysql-compatibility.md) 和 MySQL 官方文档。
## 标识符长度限制

| 标识符类型 | 最大长度(字符)|
Expand Down

0 comments on commit 1f03bb9

Please sign in to comment.