Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9226

SHOW COLUMNS returns wrong column order for tables with large ENUMs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5, 10.0, 10.1
    • Fix Version/s: 5.5.47, 10.0.23, 10.1.10
    • Component/s: Admin statements
    • Labels:
      None
    • Environment:
      Ubuntu 14.04, mariadb-10.0.21-linux-x86_64 package
    • 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.

        Attachments

        1. table_definition.txt
          6 kB
        2. mariadb_show.txt
          62 kB
        3. mariadb_mysqldump.txt
          8 kB
        4. mysql_show.txt
          61 kB
        5. mysql_mysqldump.txt
          8 kB

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              ericpp Eric P
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration