SHOW COLUMNS returns wrong column order for tables with large ENUMs

Description

The SHOW COLUMNS statement is returning columns in the wrong order when the table contains large ENUMs. The information_schema.COLUMNS table also returns the columns in the wrong order, but at least can be sorted by ORDINAL_POSITION.

This is particularly problematic when using mysqldump with --complete-inserts as the generated inserts have the columns listed in the wrong order but the data in the right order causing data to be inserted in the wrong columns.

I've attached the table definition along with the SHOW COLUMNS and mysqldump results for MariaDB 10.0.21 and MySQL 5.5.20.

Environment

Ubuntu 14.04, mariadb-10.0.21-linux-x86_64 package

Assignee

Sergei Golubchik

Reporter

Eric P

Labels

None

Components

Sprint

None

Fix versions

Affects versions

Priority

Major
Configure