Skip to content

When index column length no longer applies, Heidi still submits it and won't let you remove it #2205

@nummacway

Description

@nummacway

Description

When you change the column of an index from varchar to something else, it keeps the index column length (100 by default). Although Heidi knows it's unapplicable and prevents you from editing said length (which sadly includes removing!), it still submits the length, causing error 1189.

This bug is basically the opposite of #900 where the user says that you cannot add index column length when required by a non-varchar type like blob.

A workaround for both bugs is setting the correct value while the selected column is varchar.
A quick-and-dirty "solution" for both bugs would be never disabling the length cell.
A solution would be clearing and not submitting that cell if unapplicable. However, to not remove the workaround in #900, the types would have to be updated.

HeidiSQL version

12.11.0.7069

Database server version

MariaDB 10.11.6

Reproduction recipe

  1. Have a table with the following preconditions: First column must be varchar and it must have at least one non-length column, e.g. a tinyint.
  2. Add an index.
  3. Add a column to that index.
  4. Change column to a non-length column.
  5. Save.

Error/Backtrace

SQL Error (1089): Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDefective behaviour in HeidiSQLconfirmedIssue verified by project membernettype-mysqlMySQL and/or MariaDB specific issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions