pingcap / pingcap/tidb

Display width for `bigint/int` is not compatible with mysql 8.0

Open
#46,372 3 comments 0 reactions 0 assignees View on GitHub
affects-7.5 affects-8.1 affects-8.5 compatibility-mysql80 component/ddl found/gs may-affects-5.4 may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/major type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report
Display width for bigint/int is not compatible with mysql 8.0.We received this defined value using int,so if we define display width as unsigned(>max.int and

### 2. What did you expect to see? (Required)
```
mysql> create table b (a bigint(9223372036854775807));
ERROR 1439 (42000): Display width out of range for column 'a' (max = 4294967295)
mysql> create table a (a bigint(18446744073709551615));
ERROR 1439 (42000): Display width out of range for column 'a' (max = 4294967295)
mysql> create table b (a bigint(18446744073709551616));
ERROR 1439 (42000): Display width out of range for column 'a' (max = 4294967295)

```

### 3. What did you see instead (Required)

```
mysql> create table b (a bigint(9223372036854775807));
ERROR 1439 (42000): Display width out of range for column 'a' (max = 4294967295)
mysql> create table a (a bigint(18446744073709551615));
Query OK, 0 rows affected (0.14 sec)
mysql> create table b (a bigint(18446744073709551616));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 45 near "18446744073709551616))"
```
### 4. What is your TiDB version? (Required)

"Release Version"=v7.4.0-alpha
"Git Commit Hash"=05aa17143df86602fef68fced906c6e47a9a00e2

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.