Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-16519 : mariabackup should fail if MDL could not be acquired wit…
…h lock-ddl-per-table There is a tiny chance for race condition during MDL acquisition. If table is renamed just prior to SELECT 1 FROM <table_name> LIMIT 0 then this query would fail, yet mariabackup --backup does not handle it as fatal error and continues, only to fail later during file copy. The fix is to die on error, of MDL lock query fails.
- Loading branch information
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| CREATE TABLE t1(i int) ENGINE INNODB; | ||
| FOUND 1 /failed to execute query SELECT 1 FROM/ in backup.log | ||
| DROP TABLE t2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --source include/have_debug.inc | ||
| let $targetdir=$MYSQLTEST_VARDIR/backup; | ||
| mkdir $targetdir; | ||
| CREATE TABLE t1(i int) ENGINE INNODB; | ||
| --error 1 | ||
| exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --lock-ddl-per-table --dbug=+d,rename_during_mdl_lock_table 2>$targetdir/backup.log; | ||
|
|
||
| let SEARCH_FILE=$targetdir/backup.log; | ||
| let SEARCH_PATTERN=failed to execute query SELECT 1 FROM; | ||
| source include/search_pattern_in_file.inc; | ||
|
|
||
| DROP TABLE t2; | ||
| rmdir $targetdir; |