pingcap/tidb

unsupported add column 'name' constraint UNIQUE KEY when altering

Open

#30.188 aberto em 26 de nov. de 2021

Ver no GitHub
 (4 comments) (0 reactions) (0 assignees)Go (6.186 forks)batch import
help wantedsig/sql-infratype/enhancement

Métricas do repositório

Stars
 (40.090 stars)
Métricas de merge de PR
 (Mesclagem média 14d 4h) (346 fundiu PRs em 30d)

Description

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

Guia do colaborador