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

mariabackup --lock-ddl-per-table does not properly lock FULLTEXT auxiliary tables

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.9
    • 10.2.13, 10.3.5
    • Backup
    • None
    • 10.0.34

    Description

      The mariabackup option --lock-ddl-per-tables does not cover the tables that InnoDB internally creates for FULLTEXT INDEX.

      --source include/have_debug.inc
       
      echo # xtrabackup backup;
      let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
       
      CREATE TABLE t1 (id INT, name VARCHAR(50), purchased DATE, FULLTEXT INDEX(name)) ENGINE INNODB;
       
      --disable_result_log
      exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --lock-ddl-per-table=1 --dbug=+d,check_mdl_lock_works;
      --enable_result_log
      DROP TABLE t1;
      rmdir $targetdir;
      

      Because the internally created tables do not exist in the server data dictionary, the attempt to acquire MDL will fail:

      170917 10:30:07 Locking MDL for `test`.`FTS_0000000000000013_000000000000001c_INDEX_6`
      Error: failed to execute query SELECT * FROM `test`.`FTS_0000000000000013_000000000000001c_INDEX_6` LIMIT 0: Table 'test.FTS_0000000000000013_000000000000001c_INDEX_6' doesn't exist
      

      Furthermore, the internal tables are not protected by MDL inside InnoDB.

      The proper course of action would be to acquire MDL on the user table that is associated with the internal table. This is possible, because the internal table name includes the table_id of the user table.

      Attachments

        Issue Links

          Activity

            People

              wlad Vladislav Vaintroub
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.