[MDEV-13825] mariabackup --lock-ddl-per-table does not properly lock FULLTEXT auxiliary tables Created: 2017-09-17  Updated: 2023-12-08  Resolved: 2018-01-23

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.2.9
Fix Version/s: 10.2.13, 10.3.5

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-13563 lock DDL for mariabackup in 10.2+ Closed
Relates
relates to MDEV-22250 InnoDB: Failing assertion: opt_no_loc... Open
relates to MDEV-31904 mariabackup --backup: [ERROR] InnoDB:... Open
Sprint: 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.


Generated at Thu Feb 08 08:08:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.