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
{{ message }}
Repository navigation
[Bug]: ENUM/SET DDL accepts invalid DEFAULT values and duplicate members #31892
insert into e1(id) values (1);
ERROR 1265 (01000): Data truncated for ENUM value: 'zz'
insert into e2(id) values (1);
ERROR 1265 (01000): Data truncated for SET value: 'c'
insert into e4(id) values (1);
ERROR 1265 (01000): Data truncated for ENUM value: '3'
set sql_mode=''; insert into e1(id) values (2); -- 存成 ''
期望结果(MySQL 8.4.9)
每一条 DDL 都报:
ERROR 1067 (42000): Invalid default value for 'e' (SET 列为 's',ADD COLUMN 为 'e4')
changed the title [-][Bug]: ENUM/SET DEFAULT that is not a member is accepted at DDL, then every INSERT fails with 1265 (MySQL: 1067)[/-][+][Bug]: ENUM/SET DDL accepts invalid DEFAULT values and duplicate members[/+]on Nov 20, 2026
Administrative consolidation of #31893 into this issue. The title is broadened to cover both DDL validation contracts; this is not a fix claim.
Additional acceptance coverage retained from #31893:
Reject duplicate ENUM members with MySQL-compatible ERROR 1291 behavior under the documented strict/non-strict modes and default case-insensitive collation.
SET duplicate members must report MySQL-compatible 1291, not internal error 20301.
Activity
[-][Bug]: ENUM/SET DEFAULT that is not a member is accepted at DDL, then every INSERT fails with 1265 (MySQL: 1067)[/-][+][Bug]: ENUM/SET DDL accepts invalid DEFAULT values and duplicate members[/+]XuPeng-SH commentedon Nov 20, 2026
Administrative consolidation of #31893 into this issue. The title is broadened to cover both DDL validation contracts; this is not a fix claim.
Additional acceptance coverage retained from #31893:
ERROR 1291behavior under the documented strict/non-strict modes and default case-insensitive collation.1291, not internal error20301.Assignee retained:
matrix-meow.