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

Bad error message when moving very old .frm files to MariaDB 5.5

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.34
    • 5.5.35
    • None
    • None

    Description

      Copying host.frm from and old system to MariaDB gave the following error one access, check or repair:

      Incorrect key file for table 'host'; try to repair it

      This error doesn't tell what is wrong or how to fix it.

      Attachments

        Activity

          I have fixed this by adding a new handler error message when the .frm and storage engine definition differs:

          Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this

          In addition I fixed that REPAIR TABLE .. USE_FRM will fix old tables with same storage format between versions (no VARCHAR fields).

          monty Michael Widenius added a comment - I have fixed this by adding a new handler error message when the .frm and storage engine definition differs: Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this In addition I fixed that REPAIR TABLE .. USE_FRM will fix old tables with same storage format between versions (no VARCHAR fields).

          In addition mysql_upgrade doesn't provide any usable error message if used with a not privileged user:

          ./client/mysql_upgrade --upgrade-system-tables --user=xxx
          The --upgrade-system-tables option was used, databases won't be touched.
          FATAL ERROR: Upgrade failed

          monty Michael Widenius added a comment - In addition mysql_upgrade doesn't provide any usable error message if used with a not privileged user: ./client/mysql_upgrade --upgrade-system-tables --user=xxx The --upgrade-system-tables option was used, databases won't be touched. FATAL ERROR: Upgrade failed

          After my changes it now looks like this:

          ./client/mysql_upgrade --upgrade-system-tables --user=test --password=test --silent
          Version check failed. Got the following error when calling the 'mysql' command line client
          ERROR 1044 (42000): Access denied for user 'test'@'localhost' to database 'mysql'
          FATAL ERROR: Upgrade failed

          monty Michael Widenius added a comment - After my changes it now looks like this: ./client/mysql_upgrade --upgrade-system-tables --user=test --password=test --silent Version check failed. Got the following error when calling the 'mysql' command line client ERROR 1044 (42000): Access denied for user 'test'@'localhost' to database 'mysql' FATAL ERROR: Upgrade failed

          All issues fixed and pushed into 5.5

          monty Michael Widenius added a comment - All issues fixed and pushed into 5.5
          dbart Daniel Bartholomew added a comment - http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4019 http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4014

          People

            monty Michael Widenius
            monty Michael Widenius
            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.