You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
createtablet (a int, b int, unique index idx(a)) partition by list columns(b) (partition p0 valuesin (1), partition p1 valuesin (2));
2. What did you expect to see? (Required)
Execute success.
Currently, create table without unique index, but alter table add unique index later will be success.
test> create table t (a int, b int) partition by list columns(b) (partition p0 values in (1), partition p1 values in (2));
Query OK, 0 rows affected
Time: 0.098s
test> alter table t add unique index idx (a);
Query OK, 0 rows affected
Time: 2.818s
3. What did you see instead (Required)
test> create table t (a int, b int, unique index idx(a)) partition by list columns(b) (partition p0 valuesin (1), partition p1 valuesin (2));
(1503, "A UNIQUE INDEX must include all columns in the table's partitioning function")
Development Task
Please answer these questions before submitting your issue. Thanks!
related issue: #18032
1. Minimal reproduce step (Required)
TiDB config:
2. What did you expect to see? (Required)
Execute success.
Currently,
create table
without unique index, butalter table add unique index
later will be success.3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: