[MDEV-9226] SHOW COLUMNS returns wrong column order for tables with large ENUMs Created: 2015-12-01  Updated: 2018-09-14  Resolved: 2015-12-08

Status: Closed
Project: MariaDB Server
Component/s: Admin statements
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: 5.5.47, 10.0.23, 10.1.10

Type: Bug Priority: Major
Reporter: Eric P Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

Ubuntu 14.04, mariadb-10.0.21-linux-x86_64 package


Attachments: Text File mariadb_mysqldump.txt     Text File mariadb_show.txt     Text File mysql_mysqldump.txt     Text File mysql_show.txt     Text File table_definition.txt    
Issue Links:
Relates
relates to MDEV-17198 Wrong order when selecting in INFORMA... Closed
Sprint: 5.5.47-1

 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.



 Comments   
Comment by Elena Stepanova [ 2015-12-02 ]

Thanks for the report.

Reproducible on older versions as well.
I'm setting the fix version to 5.5+, because it might affect upgrades from 5.5.

Generated at Thu Feb 08 07:33:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.