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

Misleading and unnecessarily noisy output in mysql_upgrade

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.1(EOL), 11.2, 11.4, 10.4(EOL), 11.0(EOL), 11.3(EOL)
    • 10.5, 10.6, 10.11, 11.2, 11.4
    • Scripts & Clients
    • None

    Description

      The report is about mysql_upgrade as its output seems to be more important, but the same should apply at least to mysqlcheck, since it's the same code.

      When during the phase "Checking and upgrading tables", sub-step "Processing databases" mysql_upgrade runs CHECK TABLE ... FOR UPGRADE, it recognizes the error saying that the table needs to be upgraded and converts it into a nice-looking line in the output:

      11.4 058510a62ff9056223685d2bc544c6bff13d226f

      MariaDB [(none)]> check table advanced_db.t2_Aria for upgrade;
      +---------------------+-------+----------+--------------------------------------------------------------------------------+
      | Table               | Op    | Msg_type | Msg_text                                                                       |
      +---------------------+-------+----------+--------------------------------------------------------------------------------+
      | advanced_db.t2_Aria | check | error    | Upgrade required. Please do "REPAIR TABLE `t2_Aria`" or dump/reload to fix it! |
      +---------------------+-------+----------+--------------------------------------------------------------------------------+
      1 row in set (0.002 sec)
      

      becomes

      advanced_db.t2_Aria                                Needs upgrade
      

      However, if the CHECK output is a bit more verbose, while essentially the same, apparently the client fails to recognize it, and it writes the whole error into the output:

      MariaDB [(none)]> check table temporal_db.table2_aria_datetime_key_pk_parts_2 for upgrade;
      +-------------------------------------------------+-------+----------+------------------------------------------------------------------------------------------------------------+
      | Table                                           | Op    | Msg_type | Msg_text                                                                                                   |
      +-------------------------------------------------+-------+----------+------------------------------------------------------------------------------------------------------------+
      | temporal_db.table2_aria_datetime_key_pk_parts_2 | check | error    | Partition p0 returned error                                                                                |
      | temporal_db.table2_aria_datetime_key_pk_parts_2 | check | error    | Upgrade required. Please do "REPAIR TABLE `table2_aria_datetime_key_pk_parts_2`" or dump/reload to fix it! |
      +-------------------------------------------------+-------+----------+------------------------------------------------------------------------------------------------------------+
      2 rows in set (0.003 sec)
      

      The above remains as is in mysql_upgrade output:

      temporal_db.table2_aria_datetime_key_pk_parts_2
      error    : Partition p0 returned error
      error    : Upgrade required. Please do "REPAIR TABLE `table2_aria_datetime_key_pk_parts_2`" or dump/reload to fix it!
      

      It's not very user-friendly, as since the message differs from other surrounding tables and signals about an "error", it can be assumed that unlike other tables it requires further actions. Even although at the next sub-step "Repairing tables" it does write

      temporal_db.table2_aria_datetime_key_pk_parts_2    OK
      

      this is easy to miss or not interpret as a negation of the previous error.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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