MySQL raises ER_DUP_LIST_ENTRY (Error 3026, SQLSTATE HY000) when a duplicate value appears in a list that must contain unique elements, typically during ALTER TABLE, index creation, or enum/column definition changes.
ER_DUP_LIST_ENTRY (Error 3026) means MySQL detected a duplicate value where uniqueness is required, often while adding an index or enum value. Remove or rename the duplicate, then rerun the statement to resolve the issue.
ER_DUP_LIST_ENTRY
MySQL returns ER_DUP_LIST_ENTRY when it encounters the same value twice in a definition that must remain unique, such as column list elements, enum or set literals, or index column names. The engine stops the statement to keep metadata consistent.
The error was introduced in MySQL 5.7.4 to provide clearer feedback during DDL operations. Although it can appear at runtime, it is most common while altering tables or creating indexes.
ER_DUP_LIST_ENTRY is triggered whenever MySQL validates uniqueness constraints on lists embedded in DDL. Common triggers include adding an enum value that already exists, repeating a column in a composite index declaration, or listing the same column twice in an ALTER TABLE order clause.
Because these validations happen before execution, the error appears immediately and no data changes are applied. Understanding the exact clause that contains the duplicate is key to a quick fix.
Locate the duplicated element first. Review the DDL statement for repeated literals or column names. Remove or rename the duplicate, then rerun the command. When the duplicate lies in existing metadata, adjust the table definition to ensure every value is unique.
Always test fixes in a non-production environment. Use SHOW CREATE TABLE to view current definitions and confirm that your revised statement introduces no further duplication.
Trying to add an index with the same column listed twice triggers the error. Remove the extra column reference. Adding an enum literal that already exists also fails. Choose a distinct literal name or drop the old one.
Bulk-generated ALTER statements occasionally repeat columns by accident. Reviewing generated SQL or using a tool like Galaxy’s schema diff viewer helps spot and remove duplicates before execution.
Maintain clean schema definitions by version-controlling DDL in tools like Galaxy. Automated code reviews can catch duplicate entries early. When adding enum or set literals, script a check against INFORMATION_SCHEMA to ensure uniqueness.
Use descriptive column aliases and avoid copy-pasting index definitions without verification. Continuous integration pipelines that run mysqldump or SHOW CREATE TABLE snapshots can guard against duplicate list entries.
ER_DUP_ENTRY (1062) signals duplicate key data, not definition. ER_DUP_FIELDNAME (1060) indicates duplicate column names in SELECT lists. While all involve duplication, ER_DUP_LIST_ENTRY is limited to metadata lists; fixing it requires editing the DDL, not the data.
Listing the same column twice while defining or altering an index immediately raises ER_DUP_LIST_ENTRY.
Adding an enum value that already exists in the column definition causes the duplicate entry error.
Generated or manually copied DDL can repeat column names in ORDER BY or ADD COLUMN lists, triggering the error.
Data duplication against a unique index at insert or update time.
Duplicate column in SELECT or ALTER TABLE statement.
Attempt to create an index with a name that already exists.
No. The statement fails before data or metadata changes, preserving the current schema.
Versions 5.7.4 and later report ER_DUP_LIST_ENTRY. Earlier versions show generic errors.
No. The duplicate must be removed or changed; SQL modes do not suppress this specific error.
Galaxy flags duplicate literals or columns during query composition, offers fixes via AI copilot, and enforces review workflows that catch schema errors early.