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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.34
    • Fix Version/s: 5.5.35
    • Component/s: None
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            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).

            Show
            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).
            Hide
            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

            Show
            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
            Hide
            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

            Show
            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
            Hide
            monty Michael Widenius added a comment -

            All issues fixed and pushed into 5.5

            Show
            monty Michael Widenius added a comment - All issues fixed and pushed into 5.5
            Show
            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

              • Assignee:
                monty Michael Widenius
                Reporter:
                monty Michael Widenius
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h