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

SHOW COLUMNS returns wrong column order for tables with large ENUMs

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5(EOL), 10.0(EOL), 10.1(EOL)
    • 5.5.47, 10.0.23, 10.1.10
    • Admin statements
    • None
    • Ubuntu 14.04, mariadb-10.0.21-linux-x86_64 package
    • 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. mariadb_mysqldump.txt
          8 kB
        2. mariadb_show.txt
          62 kB
        3. mysql_mysqldump.txt
          8 kB
        4. mysql_show.txt
          61 kB
        5. table_definition.txt
          6 kB

        Issue Links

          Activity

            ericpp Eric P created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Status Open [ 1 ] Confirmed [ 10101 ]

            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.

            elenst Elena Stepanova added a comment - 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.
            elenst Elena Stepanova made changes -
            Component/s Admin statements [ 11400 ]
            Fix Version/s 5.5 [ 15800 ]
            Fix Version/s 10.0 [ 16000 ]
            Fix Version/s 10.1 [ 16100 ]
            Affects Version/s 5.5 [ 15800 ]
            Affects Version/s 10.0 [ 16000 ]
            Affects Version/s 10.1 [ 16100 ]
            Affects Version/s 10.0.21 [ 19406 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Sprint 5.5.47-1 [ 22 ]
            serg Sergei Golubchik made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Fix Version/s 5.5.47 [ 20300 ]
            Fix Version/s 10.0.23 [ 20401 ]
            Fix Version/s 10.1.10 [ 20402 ]
            Fix Version/s 5.5 [ 15800 ]
            Fix Version/s 10.0 [ 16000 ]
            Fix Version/s 10.1 [ 16100 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            szinsius Sébastien Zinsius made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 72828 ] MariaDB v4 [ 149883 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.