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

Invoking aria_pack breaks backups

    XMLWordPrintable

Details

    • Can result in data loss

    Description

      While testing MDEV-39092 as part of MDEV-14492, saahil noted that invoking aria_pack makes files inaccessible to backup. In that development branch, we get a nice error message for the following test:

      --source include/have_aria.inc
       
      CREATE TABLE t1 (a INT) ENGINE=Aria TRANSACTIONAL=1;
      INSERT INTO t1 VALUES (1),(2);
      FLUSH TABLE t1;
      --exec $MARIA_PACK -s $MARIADB_DATADIR/test/t1
      SELECT * FROM t1;
      --let $bk= $MYSQLTEST_VARDIR/bk
      --evalp BACKUP SERVER TO '$bk'
      --rmdir $bk
      DROP TABLE t1;
      

      MDEV-14992 19cfc3f8e1d2e94f69407036152184ef9e006095

      mysqltest: At line 9: query 'BACKUP SERVER TO '$bk'' failed: HA_ERR_NOT_A_TABLE (130): Error 130 reading the header of ./test/t1.MAI
      

      I converted the test and saved to mariabackup.aria_pack as follows:

      CREATE TABLE t1 (a INT) ENGINE=Aria TRANSACTIONAL=1;
      INSERT INTO t1 VALUES (1),(2);
      FLUSH TABLE t1;
      --exec $MARIA_PACK -s $MARIADB_DATADIR/test/t1
      SELECT * FROM t1;
       
      --let $targetdir= $MYSQLTEST_VARDIR/tmp/backup
       
      --disable_result_log
      --exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir
      --exec $XTRABACKUP --prepare --target-dir=$targetdir
      --source include/restart_and_restore.inc
      --enable_result_log
       
      SELECT * FROM t1;
      DROP TABLE t1;
      

      This test fails in a worse way: the table t1 will be inaccessible after the backup and restore!

      10.11 3b9ce260ad001ae81e6034d59b046a0db9f610aa

      mysqltest: At line 17: query 'SELECT * FROM t1' failed: ER_FILE_NOT_FOUND (1017): Can't find file: './test/t1.MAI' (errno: 2 "No such file or directory")
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1.25h
                  1.25h

                  Git Integration

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