#334 When altering a table, single-option enum field raises an error

3.7.0
closed-fixed
nobody
None
5
2013-12-21
2013-08-19
No

Observed under Adminer 3.7.1, connecting to MySQL 5.0.77

When altering or creating a table that has an enum field with only a single option, Adminer seems generate an invalid CREATE/ALTER statement. Specifically, the enum definition will be empty e.g. ENUM() rather than ENUM('myvalue').

I've taken a quick look at the source code, and the problem could possibly stem from the JS function editingLengthBlur, which doesn't wrap the value in quotes if there's no newline. I guess this is so it handles length values for other fields properly?

Cheers

Discussion

  • Jakub Vrána

    Jakub Vrána - 2013-12-21
    • status: open --> closed-fixed
     
  • Jakub Vrána

    Jakub Vrána - 2013-12-21

    Fixed, thanks for the report.

     

Log in to post a comment.