pingcap / pingcap/tidb

The default LONGTEXT column length is incompatible with the TiPB message.

Open
#64,255 0 comments 0 reactions 0 assignees View on GitHub
component/ddl type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

DDL sets the default column length for the `LONGTEXT` data type to [4,294,967,295](https://github.com/pingcap/tidb/blob/master/pkg/parser/mysql/util.go#L21-L49), which does not fit the `int32` field `column_length` defined in TiPB’s [schema.proto](https://github.com/pingcap/tipb/blob/9fd33ded6f2c94633e601104cde26f2bdb5147d5/proto/schema.proto#L28). Since TiCI follows the `int32` definition from TiPB, this causes a serialization error in TiCI.

In addition, according to the `LONGTEXT` [documentation](https://docs.pingcap.com/zh/tidb/stable/data-type-string/), its maximum practical length cannot exceed approximately 120 MB.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.