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

Aria Table Data Loss

    XMLWordPrintable

    Details

      Description

      I have found a critical bug in Aria (Page storage format) where tables are wiped if someone runs a repair command with the USE_FRM flag.

      REPAIR TABLE X USE_FRM

      This bug only exists for databases that use an encryption plugin. In our case we use a file encryption plugin, however it is likely this bug affects all types of encryption plugin.

      Disabling the encryption plugin or changing the storage format to Dynamic will prevent the USE_FRM from wiping the table.

      However, since we require Data Encryption at Rest, we have to use encryption and Page storage format.

      To reproduce, set up a Windows VM with MariaDB 10.5.13 (or later) installed.
      Load on a file-based encryption plugin (or any other encryption plugin).

      Then create a database and some tables and add data.
      Finally, run a repair table command with the additional flag USE_FRM.

      Now disconnect and reconnect to the Database and you will see all data has been removed.

      A proposed dirty fix could be the following:
      If table type is Aria and Storage Format is Page and encryption is enabled, then ignore USE_FRM flag if its passed in.

        Attachments

          Activity

            People

            Assignee:
            monty Michael Widenius
            Reporter:
            Chris Haddon Chris Haddon
            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.