-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alter set/enum type column does not check constraint #19804
Comments
Integrity check: Please comment /info to get template |
/info |
Please edit this comment to complete the following informationBug1. Root Cause Analysis (RCA)Alter set/enum type column does not check constraint 2. Symptomalter table t change a a set('a', 'b', 'c', 'c'); #success 3. Minimal steps to reproduce the bug (optional)drop table if exists t;
create table t(a set('a', 'b', 'c'));
alter table t change a a set('a', 'b', 'c', 'c');
show create table t;
+-------+------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+------------------------------------------------------------------------------------------------------------------------+
| t | CREATE TABLE `t` (
`a` set('a','b','c','c') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------+------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec) 4. Solution (optional)
5. W/A (Workaround)
6. Affected versions[v3.0.0:v3.0.18],[v4.0.0:v4.0.6] 7. Fixed versions[v3.0.19], [v4.0.7] |
Please edit this comment to complete the following informationBugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA)Alter set/enum type column does not check constraint 2. Symptomalter table t change a a set('a', 'b', 'c', 'c'); #success 3. All Trigger Conditionsdrop table if exists t; show create table t; 4. Workaround (optional)5. Affected versions[v3.0.0:v3.0.18],[v4.0.0:v4.0.6] 6. Fixed versions[v3.0.19], [v4.0.7] |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
[HY000][1291] Column 'a' has duplicated value 'c' in SET
3. What did you see instead (Required)
success
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: