pingcap/tidb

unsupported add column 'name' constraint UNIQUE KEY when altering

Open

#30,188 建立於 2021年11月26日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)Go (6,186 fork)batch import
help wantedsig/sql-infratype/enhancement

倉庫指標

Star
 (40,090 star)
PR 合併指標
 (平均合併 14天 4小時) (30 天內合併 346 個 PR)

描述

Bug Report

It works fine on MySQL but reports an error on TiDB.

1. Minimal reproduce step (Required)

create table t2(id int);
ALTER TABLE `t2` ADD COLUMN `name` varchar(255) UNIQUE;

2. What did you expect to see? (Required)

No error.

3. What did you see instead (Required)

(8200, "unsupported add column 'name' constraint UNIQUE KEY when altering 'test.t2'")

4. What is your TiDB version? (Required)

tidb_version() | Release Version: v5.1.2
Edition: Community
Git Commit Hash: dc079337ef0c9d78eec2d2acb1eb31e12117d29b
Git Branch: heads/refs/tags/v5.1.2
UTC Build Time: 2021-09-27 02:47:40
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

貢獻者指南