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

Possible table (mysql.innodb_table_stats) structure mismatch in internals

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • 10.3(EOL)
    • None
    • None
    • Running mariadb as a service on Windows machine (7-10, also server versions)

    Description

      We have got datafiles folder from the customer, so I have no steps for reproducing this situation. However, let's assume that we want to get out of it somehow.

      Please see results of two queries in the attachment. I would like to highlight difference in
      from information_schema.innodb_sys_columns

      *************************** 2. row ***************************
          NAME: mysql/innodb_table_stats
      TABLE_ID: 15
          NAME: table_name
           POS: 1
         MTYPE: 12
        PRTYPE: 5439759
           LEN: *192*
      

      from information_schema.columns

      *************************** 2. row ***************************
                 TABLE_CATALOG: def
                  TABLE_SCHEMA: mysql
                    TABLE_NAME: innodb_table_stats
                   COLUMN_NAME: table_name
              ORDINAL_POSITION: 2
                COLUMN_DEFAULT: NULL
                   IS_NULLABLE: NO
                     DATA_TYPE: varchar
      CHARACTER_MAXIMUM_LENGTH: 199
        CHARACTER_OCTET_LENGTH: *597*
             NUMERIC_PRECISION: NULL
                 NUMERIC_SCALE: NULL
      ....
                   COLUMN_TYPE: varchar(199)
      ....
         GENERATION_EXPRESSION: NULL
      

      Somehow we managed to have column length updated in information_schema.columns (597 bytes length), but not in information_schema.innodb_sys_columns (192 bytes length).

      mysql_upgrade reports that mysql.innodb_table_stats as well as mysql.innodb_index_stats are up to date, while customer continue getting

      2020-02-10 14:20:33 8 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
      2020-02-10 14:20:33 8 [ERROR] InnoDB: Column last_update in table `mysql`.`innodb_table_stats` is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
      

      last_update type is also wrong, you can see it the attached file, but it is not that obvious as string length difference.

      I've prepared archive of the internals, but it is 75Mb and I cannot attach it here.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sergii.gulyk Sergii Gulyk
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.