[MDEV-16762] mariabackup --lock-ddl-per-table can not create backup safely when RENAME TABLE happens many times during the backup stage Created: 2018-07-15  Updated: 2020-08-25  Resolved: 2018-08-14

Status: Closed
Project: MariaDB Server
Component/s: mariabackup
Affects Version/s: 10.2.16, 10.2.17
Fix Version/s: 10.2.18, 10.3.10

Type: Bug Priority: Critical
Reporter: Valerii Kravchuk Assignee: Vladislav Vaintroub
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-16791 mariabackup : allow consistent backup... Closed

 Description   

It seems mariabackup, even with --lock-ddl-per-table option, can not create consistent backup when RENAME TABLE happens many times during the backup stage.

There is a simple test case for this. Start with new instance and add the following two tables:

openxs@ao756:~/dbs/maria10.2$ bin/mysql -uroot --socket=/tmp/mysql.sock test
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.2.17-MariaDB Source distribution
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [test]> show tables;
Empty set (0.00 sec)
 
MariaDB [test]> create table tbig(id int auto_increment, c1 char(200), c2 char(200), primary key(id)) engine=InnoDB;
Query OK, 0 rows affected (0.23 sec)
 
MariaDB [test]> insert into tbig(c1,c2) values ('a','b');
Query OK, 1 row affected (0.04 sec)
 
MariaDB [test]> insert into tbig(c1, c2) select repeat('a',200), repeat('b',200) from tbig, tbig t2, tbig t3, tbig t4;
Query OK, 1 row affected (0.05 sec)
Records: 1  Duplicates: 0  Warnings: 0
 
MariaDB [test]> insert into tbig(c1, c2) select repeat('a',200), repeat('b',200) from tbig, tbig t2, tbig t3, tbig t4;
Query OK, 16 rows affected (0.05 sec)
Records: 16  Duplicates: 0  Warnings: 0
 
MariaDB [test]> insert into tbig(c1, c2) select repeat('a',200), repeat('b',200) from tbig, tbig t2, tbig t3, tbig t4;
Query OK, 104976 rows affected (5.80 sec)
Records: 104976  Duplicates: 0  Warnings: 0
 
MariaDB [test]> insert into tbig(c1, c2) select repeat('a',200), repeat('b',200) from tbig;
Query OK, 104994 rows affected (5.94 sec)
Records: 104994  Duplicates: 0  Warnings: 0
 
MariaDB [test]> insert into tbig(c1, c2) select repeat('a',200), repeat('b',200) from tbig;
Query OK, 209988 rows affected (12.74 sec)
Records: 209988  Duplicates: 0  Warnings: 0
 
MariaDB [test]> insert into tbig(c1, c2) select repeat('a',200), repeat('b',200) from tbig;
Query OK, 419976 rows affected (28.18 sec)
Records: 419976  Duplicates: 0  Warnings: 0
 
MariaDB [test]> insert into tbig(c1, c2) select repeat('a',200), repeat('b',200) from tbig;
Query OK, 839952 rows affected (1 min 5.06 sec)
Records: 839952  Duplicates: 0  Warnings: 0
 
MariaDB [test]> show table status like 'tbig'\G                                 
*************************** 1. row ***************************
           Name: tbig
         Engine: InnoDB
        Version: 10
     Row_format: Dynamic
           Rows: 1594309
 Avg_row_length: 464
    Data_length: 740294656
Max_data_length: 0
   Index_length: 0
      Data_free: 4194304
 Auto_increment: 1835014
    Create_time: 2018-07-15 18:14:26
    Update_time: 2018-07-15 18:32:40
     Check_time: NULL
      Collation: latin1_swedish_ci
       Checksum: NULL
 Create_options:
        Comment:
1 row in set (0.00 sec)
 
MariaDB [test]> create table t(id int primary key, c1 int);
Query OK, 0 rows affected (0.21 sec)
 
MariaDB [test]> insert into t values(1,1),(2,2);
Query OK, 2 rows affected (0.04 sec)
Records: 2  Duplicates: 0  Warnings: 0
 
MariaDB [test]> show tables;
+----------------+
| Tables_in_test |
+----------------+
| t              |
| tbig           |
+----------------+
2 rows in set (0.00 sec)
 
MariaDB [test]> exit

Then in one shell window start the following loop of renaming tables:

openxs@ao756:~/dbs/maria10.2$ for i in {0..999}; do bin/mysql -e "use test; drop table if exists tmp_t${i}; create table tmp_t${i} like t; rename table t to zem_t${i}, tmp_t${i} to t; drop table zem_t${i};"; echo "${i}"; sleep 5; done;

While this loop runs (I let it execute at least once, but you can try whatever timing you prefer) try to run mariabackup with --lock-ddl-per-table option:

openxs@ao756: ~/dbs/maria10.2openxs@ao756:~/dbs/maria10.2$ bin/mariabackup -uroot --no-version-check --verbosee --backup --lock-ddl-per-table --target-dir=/home/openxs/backup --tmpdir=/home/openxs/backup

Backup completes with OK message. You may get concurrent statement killed if it's DDL involving t table. Let me share the log:

180715 19:28:10 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: not set
Using server version 10.2.17-MariaDB
bin/mariabackup based on MariaDB server 10.2.17-MariaDB Linux (x86_64) 
mariabackup: uses posix_fadvise().
mariabackup: cd to /home/openxs/dbs/maria10.2/data/
mariabackup: open files limit requested 0, set to 1024
mariabackup: using the following InnoDB configuration:
mariabackup:   innodb_data_home_dir = 
mariabackup:   innodb_data_file_path = ibdata1:12M:autoextend
mariabackup:   innodb_log_group_home_dir = ./
mariabackup: using O_DIRECT
2018-07-15 19:28:10 139901451954048 [Note] InnoDB: Number of pools: 1
mariabackup: Generating a list of tablespaces
2018-07-15 19:28:10 139901451954048 [Warning] InnoDB: Allocated tablespace ID 1 for mysql/innodb_table_stats, old maximum was 0
MLOG_CHECKPOINT(6455019076) ignored at 6455019085
180715 19:28:10 >> log scanned up to (6455019085)
180715 19:28:10 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: not set
180715 19:28:10 Locking MDL for `mysql`.`innodb_table_stats`
180715 19:28:10 Locking MDL for `mysql`.`innodb_index_stats`
180715 19:28:10 Locking MDL for `mysql`.`gtid_slave_pos`
180715 19:28:10 Locking MDL for `test`.`t`
180715 19:28:10 Locking MDL for `test`.`tbig`
180715 19:28:10 [01] Copying ibdata1 to /home/openxs/backup/ibdata1
180715 19:28:11 >> log scanned up to (6455019085)
180715 19:28:12 >> log scanned up to (6455019085)
180715 19:28:13 [01]        ...done
180715 19:28:13 [01] Copying ./mysql/innodb_table_stats.ibd to /home/openxs/backup/mysql/innodb_table_stats.ibd
180715 19:28:13 [01]        ...done
180715 19:28:13 [01] Copying ./mysql/innodb_index_stats.ibd to /home/openxs/backup/mysql/innodb_index_stats.ibd
180715 19:28:13 [01]        ...done
180715 19:28:13 [01] Copying ./mysql/gtid_slave_pos.ibd to /home/openxs/backup/mysql/gtid_slave_pos.ibd
180715 19:28:13 [01]        ...done
180715 19:28:13 [01] Copying ./test/t.ibd to /home/openxs/backup/test/t.ibd
180715 19:28:13 [01]        ...done
180715 19:28:13 [01] Copying ./test/tbig.ibd to /home/openxs/backup/test/tbig.ibd
180715 19:28:13 >> log scanned up to (6455019102)
180715 19:28:14 >> log scanned up to (6455022545)
180715 19:28:15 >> log scanned up to (6455023319)
180715 19:28:16 >> log scanned up to (6455023325)
180715 19:28:17 >> log scanned up to (6455023364)
MLOG_CHECKPOINT(6455023325) ignored at 6455023826
180715 19:28:18 >> log scanned up to (6455023826)
180715 19:28:19 >> log scanned up to (6455024194)
MLOG_CHECKPOINT(6455023364) ignored at 6455024423
180715 19:28:21 >> log scanned up to (6455024423)
180715 19:28:22 >> log scanned up to (6455024599)
MLOG_CHECKPOINT(6455024599) ignored at 6455025108
180715 19:28:23 >> log scanned up to (6455025108)
180715 19:28:24 >> log scanned up to (6455025298)
2018-07-15 19:28:25 139901381166848 [Note] InnoDB: Read redo log up to LSN=6455026688
MLOG_CHECKPOINT(6455025298) ignored at 6455026511
180715 19:28:25 >> log scanned up to (6455026511)
180715 19:28:26 >> log scanned up to (6455026511)
MLOG_CHECKPOINT(6455026511) ignored at 6455026520
180715 19:28:27 >> log scanned up to (6455026520)
180715 19:28:28 >> log scanned up to (6455026520)
180715 19:28:29 >> log scanned up to (6455026520)
180715 19:28:30 >> log scanned up to (6455026520)
180715 19:28:31 >> log scanned up to (6455026520)
180715 19:28:32 >> log scanned up to (6455026520)
180715 19:28:33 >> log scanned up to (6455026520)
180715 19:28:34 >> log scanned up to (6455026520)
180715 19:28:35 >> log scanned up to (6455026520)
180715 19:28:36 >> log scanned up to (6455026520)
180715 19:28:37 >> log scanned up to (6455026520)
180715 19:28:38 >> log scanned up to (6455026520)
180715 19:28:39 >> log scanned up to (6455026520)
180715 19:28:39 [01]        ...done
180715 19:28:39 Executing FLUSH NO_WRITE_TO_BINLOG TABLES...
180715 19:28:39 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: not set
180715 19:28:39 Killing MDL waiting Query ('rename table t to zem_t1, tmp_t1 to t') on connection 13
2018-07-15 19:28:40 139901381166848 [Note] InnoDB: Read redo log up to LSN=6455026688
180715 19:28:40 >> log scanned up to (6455026520)
180715 19:28:40 Executing FLUSH TABLES WITH READ LOCK...
180715 19:28:40 Kill mdl waiters thread stopped
180715 19:28:40 Starting to backup non-InnoDB tables and files
180715 19:28:40 [01] Copying ./mysql/time_zone.MYI to /home/openxs/backup/mysql/time_zone.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/func.MYI to /home/openxs/backup/mysql/func.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/procs_priv.frm to /home/openxs/backup/mysql/procs_priv.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/user.frm to /home/openxs/backup/mysql/user.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/host.frm to /home/openxs/backup/mysql/host.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/tables_priv.MYI to /home/openxs/backup/mysql/tables_priv.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_transition.MYI to /home/openxs/backup/mysql/time_zone_transition.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_keyword.frm to /home/openxs/backup/mysql/help_keyword.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/innodb_table_stats.frm to /home/openxs/backup/mysql/innodb_table_stats.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_keyword.MYI to /home/openxs/backup/mysql/help_keyword.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/plugin.MYI to /home/openxs/backup/mysql/plugin.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/columns_priv.MYI to /home/openxs/backup/mysql/columns_priv.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/db.frm to /home/openxs/backup/mysql/db.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_relation.frm to /home/openxs/backup/mysql/help_relation.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/tables_priv.MYD to /home/openxs/backup/mysql/tables_priv.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/event.frm to /home/openxs/backup/mysql/event.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/columns_priv.frm to /home/openxs/backup/mysql/columns_priv.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/proc.MYI to /home/openxs/backup/mysql/proc.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_transition.MYD to /home/openxs/backup/mysql/time_zone_transition.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/innodb_index_stats.frm to /home/openxs/backup/mysql/innodb_index_stats.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/columns_priv.MYD to /home/openxs/backup/mysql/columns_priv.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_transition.frm to /home/openxs/backup/mysql/time_zone_transition.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/servers.MYI to /home/openxs/backup/mysql/servers.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/column_stats.MYI to /home/openxs/backup/mysql/column_stats.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/table_stats.frm to /home/openxs/backup/mysql/table_stats.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/proxies_priv.frm to /home/openxs/backup/mysql/proxies_priv.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/gtid_slave_pos.frm to /home/openxs/backup/mysql/gtid_slave_pos.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_leap_second.frm to /home/openxs/backup/mysql/time_zone_leap_second.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/roles_mapping.MYD to /home/openxs/backup/mysql/roles_mapping.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/func.frm to /home/openxs/backup/mysql/func.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/host.MYD to /home/openxs/backup/mysql/host.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/general_log.CSM to /home/openxs/backup/mysql/general_log.CSM
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/slow_log.CSM to /home/openxs/backup/mysql/slow_log.CSM
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_leap_second.MYD to /home/openxs/backup/mysql/time_zone_leap_second.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/slow_log.frm to /home/openxs/backup/mysql/slow_log.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/host.MYI to /home/openxs/backup/mysql/host.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_topic.frm to /home/openxs/backup/mysql/help_topic.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_topic.MYI to /home/openxs/backup/mysql/help_topic.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_name.frm to /home/openxs/backup/mysql/time_zone_name.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/servers.MYD to /home/openxs/backup/mysql/servers.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/roles_mapping.frm to /home/openxs/backup/mysql/roles_mapping.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/user.MYI to /home/openxs/backup/mysql/user.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/plugin.MYD to /home/openxs/backup/mysql/plugin.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/general_log.frm to /home/openxs/backup/mysql/general_log.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/event.MYD to /home/openxs/backup/mysql/event.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/db.MYD to /home/openxs/backup/mysql/db.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_name.MYD to /home/openxs/backup/mysql/time_zone_name.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/slow_log.CSV to /home/openxs/backup/mysql/slow_log.CSV
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_category.MYD to /home/openxs/backup/mysql/help_category.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/column_stats.MYD to /home/openxs/backup/mysql/column_stats.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_keyword.MYD to /home/openxs/backup/mysql/help_keyword.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/procs_priv.MYI to /home/openxs/backup/mysql/procs_priv.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_relation.MYI to /home/openxs/backup/mysql/help_relation.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/tables_priv.frm to /home/openxs/backup/mysql/tables_priv.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/proc.MYD to /home/openxs/backup/mysql/proc.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/index_stats.MYD to /home/openxs/backup/mysql/index_stats.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/table_stats.MYI to /home/openxs/backup/mysql/table_stats.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_name.MYI to /home/openxs/backup/mysql/time_zone_name.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/general_log.CSV to /home/openxs/backup/mysql/general_log.CSV
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/index_stats.frm to /home/openxs/backup/mysql/index_stats.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_transition_type.MYI to /home/openxs/backup/mysql/time_zone_transition_type.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/column_stats.frm to /home/openxs/backup/mysql/column_stats.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/plugin.frm to /home/openxs/backup/mysql/plugin.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/index_stats.MYI to /home/openxs/backup/mysql/index_stats.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_leap_second.MYI to /home/openxs/backup/mysql/time_zone_leap_second.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_topic.MYD to /home/openxs/backup/mysql/help_topic.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_category.MYI to /home/openxs/backup/mysql/help_category.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/servers.frm to /home/openxs/backup/mysql/servers.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/event.MYI to /home/openxs/backup/mysql/event.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/proc.frm to /home/openxs/backup/mysql/proc.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_transition_type.MYD to /home/openxs/backup/mysql/time_zone_transition_type.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone.frm to /home/openxs/backup/mysql/time_zone.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_category.frm to /home/openxs/backup/mysql/help_category.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/func.MYD to /home/openxs/backup/mysql/func.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/proxies_priv.MYD to /home/openxs/backup/mysql/proxies_priv.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone.MYD to /home/openxs/backup/mysql/time_zone.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/help_relation.MYD to /home/openxs/backup/mysql/help_relation.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/roles_mapping.MYI to /home/openxs/backup/mysql/roles_mapping.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/proxies_priv.MYI to /home/openxs/backup/mysql/proxies_priv.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/user.MYD to /home/openxs/backup/mysql/user.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/table_stats.MYD to /home/openxs/backup/mysql/table_stats.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/time_zone_transition_type.frm to /home/openxs/backup/mysql/time_zone_transition_type.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/procs_priv.MYD to /home/openxs/backup/mysql/procs_priv.MYD
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./mysql/db.MYI to /home/openxs/backup/mysql/db.MYI
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./test/tmp_t1.frm to /home/openxs/backup/test/tmp_t1.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./test/t.frm to /home/openxs/backup/test/t.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./test/tbig.frm to /home/openxs/backup/test/tbig.frm
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./test/db.opt to /home/openxs/backup/test/db.opt
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying ./performance_schema/db.opt to /home/openxs/backup/performance_schema/db.opt
180715 19:28:40 [01]        ...done
180715 19:28:40 Finished backing up non-InnoDB tables and files
180715 19:28:40 [01] Copying aria_log.00000001 to /home/openxs/backup/aria_log.00000001
180715 19:28:40 [01]        ...done
180715 19:28:40 [01] Copying aria_log_control to /home/openxs/backup/aria_log_control
180715 19:28:40 [01]        ...done
180715 19:28:40 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
mariabackup: The latest check point (for incremental): '6455026511'
mariabackup: Stopping log copying thread.180715 19:28:40 >> log scanned up to (6455026520)
 
180715 19:28:40 >> log scanned up to (6455026520)
180715 19:28:40 Executing UNLOCK TABLES
180715 19:28:40 All tables unlocked
180715 19:28:40 Unlocking MDL for all tables
180715 19:28:40 [00] Copying ib_buffer_pool to /home/openxs/backup/ib_buffer_pool
180715 19:28:40 [00]        ...done
180715 19:28:40 Backup created in directory '/home/openxs/backup/'
180715 19:28:40 [00] Writing backup-my.cnf
180715 19:28:40 [00]        ...done
180715 19:28:40 [00] Writing xtrabackup_info
180715 19:28:40 [00]        ...done
mariabackup: Redo log (from LSN 6455019076 to 6455026520) was copied.
180715 19:28:40 completed OK!

Stop rename loop as soon as backup completed:

openxs@ao756:~/dbs/maria10.2$ for i in {0..999}; do bin/mysql -e "use test; drop table if exists tmp_t${i}; create table tmp_t${i} like t; rename table t to zem_t${i}, tmp_t${i} to t; drop table zem_t${i};"; echo "${i}"; sleep 5; done;
0
1
^C

Note that you may get error for one of RENAME statements.

Then prepare the backup. Again, in all cases we get "completed OK!":

openxs@ao756: ~/dbs/maria10.2$ bin/mariabackup -uroot --verbose --no-version-check --prepare --target-dir=/home/openxs/backup
bin/mariabackup based on MariaDB server 10.2.17-MariaDB Linux (x86_64) 
mariabackup: cd to /home/openxs/backup/
mariabackup: This target seems to be not prepared yet.
mariabackup: using the following InnoDB configuration for recovery:
mariabackup:   innodb_data_home_dir = .
mariabackup:   innodb_data_file_path = ibdata1:12M:autoextend
mariabackup:   innodb_log_group_home_dir = .
mariabackup: Starting InnoDB instance for recovery.
mariabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Uses event mutexes
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Number of pools: 1
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Using SSE2 crc32 instructions
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Completed initialization of buffer pool
2018-07-15 19:29:21 139735745947392 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Highest supported file format is Barracuda.
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Starting crash recovery from checkpoint LSN=6455019076
MLOG_CHECKPOINT(6455019076) read at 6455019085
MLOG_CHECKPOINT(6455019076) reread at 6455019085
MLOG_CHECKPOINT(6455023325) ignored at 6455023826
MLOG_CHECKPOINT(6455023364) ignored at 6455024423
MLOG_CHECKPOINT(6455024599) ignored at 6455025108
MLOG_CHECKPOINT(6455025298) ignored at 6455026511
MLOG_CHECKPOINT(6455026511) ignored at 6455026520
2018-07-15 19:29:21 139736077338496 [Warning] InnoDB: Tablespace 430 was not found at ./test/tmp_t1.ibd when restoring a (partial?) backup. All redo log for this file will be ignored!
2018-07-15 19:29:21 139736077338496 [Note] InnoDB: Starting final batch to recover 87 pages from redo log.
Applying log to page 0:0
apply 6455023576: 1 len 4 page 0:0
apply 6455023583: 1 len 4 page 0:0
apply 6455023590: 4 len 4 page 0:0
Applying log to page 2:3
apply 6455022823: 38 len 106 page 2:3
apply 6455023011: 38 len 129 page 2:3
apply 6455023193: 38 len 116 page 2:3
Applying log to page 1:3
apply 6455022616: 38 len 84 page 1:3
Applying log to page 0:7
apply 6455019085: 8 len 7 page 0:7
apply 6455019095: 4 len 4 page 0:7
apply 6455020125: 8 len 7 page 0:7
Applying log to page 0:8
apply 6455019719: 9 len 79 page 0:8
Applying log to page 0:9
apply 6455019801: 8 len 7 page 0:9
apply 6455019811: 9 len 33 page 0:9
Applying log to page 0:10
apply 6455019871: 9 len 39 page 0:10
apply 6455019936: 9 len 35 page 0:10
Applying log to page 0:11
apply 6455020162: 9 len 52 page 0:11
apply 6455022531: 4 len 3 page 0:11
apply 6455023319: 4 len 3 page 0:11
Applying log to page 0:12
apply 6455020240: 9 len 23 page 0:12
Applying log to page 0:1771
apply 6455022545: 24 len 5 page 0:1771
apply 6455022554: 2 len 4 page 0:1771
apply 6455022562: 2 len 4 page 0:1771
apply 6455022570: 2 len 4 page 0:1771
apply 6455022579: 20 len 17 page 0:1771
apply 6455022740: 2 len 3 page 0:1771
Applying log to page 0:420
apply 6455025384: 4 len 7 page 0:420
apply 6455025395: 2 len 3 page 0:420
Applying log to page 0:422
apply 6455023520: 2 len 3 page 0:422
Applying log to page 0:442
apply 6455019646: 24 len 5 page 0:442
apply 6455019655: 2 len 4 page 0:442
apply 6455019663: 2 len 4 page 0:442
apply 6455019671: 2 len 4 page 0:442
apply 6455019679: 1 len 3 page 0:442
apply 6455019686: 8 len 7 page 0:442
apply 6455019698: 20 len 17 page 0:442
apply 6455019848: 20 len 19 page 0:442
apply 6455019913: 20 len 19 page 0:442
apply 6455019974: 20 len 10 page 0:442
apply 6455020057: 20 len 10 page 0:442
apply 6455020135: 20 len 23 page 0:442
apply 6455020217: 20 len 19 page 0:442
apply 6455022538: 2 len 3 page 0:442
Applying log to page 0:443
apply 6455022747: 24 len 5 page 0:443
apply 6455022756: 2 len 4 page 0:443
apply 6455022764: 2 len 4 page 0:443
apply 6455022772: 2 len 4 page 0:443
apply 6455022781: 20 len 38 page 0:443
apply 6455022969: 20 len 38 page 0:443
apply 6455023159: 20 len 30 page 0:443
apply 6455023312: 2 len 3 page 0:443
Applying log to page 0:48
apply 6455023325: 4 len 7 page 0:48
apply 6455023335: 2 len 3 page 0:48
apply 6455023341: 4 len 7 page 0:48
apply 6455023351: 2 len 3 page 0:48
apply 6455023357: 4 len 3 page 0:48
Applying log to page 0:49
apply 6455023364: 4 len 7 page 0:49
apply 6455023374: 2 len 3 page 0:49
apply 6455023380: 4 len 7 page 0:49
apply 6455023390: 2 len 3 page 0:49
apply 6455023396: 4 len 3 page 0:49
Applying log to page 0:50
apply 6455023403: 4 len 7 page 0:50
apply 6455023413: 2 len 3 page 0:50
apply 6455023419: 4 len 7 page 0:50
apply 6455023429: 2 len 3 page 0:50
apply 6455023435: 4 len 3 page 0:50
Applying log to page 0:51
apply 6455023442: 4 len 7 page 0:51
apply 6455023452: 2 len 3 page 0:51
apply 6455023458: 4 len 7 page 0:51
apply 6455023468: 2 len 3 page 0:51
apply 6455023474: 4 len 3 page 0:51
Applying log to page 0:52
apply 6455023481: 4 len 7 page 0:52
apply 6455023491: 2 len 3 page 0:52
apply 6455023497: 4 len 7 page 0:52
apply 6455023507: 2 len 3 page 0:52
apply 6455023513: 4 len 3 page 0:52
Applying log to page 0:53
apply 6455023527: 4 len 7 page 0:53
apply 6455023537: 2 len 3 page 0:53
apply 6455023543: 4 len 7 page 0:53
apply 6455023553: 2 len 3 page 0:53
apply 6455023559: 4 len 3 page 0:53
apply 6455023635: 4 len 3 page 0:53
Applying log to page 0:62
apply 6455023642: 4 len 7 page 0:62
apply 6455023652: 2 len 3 page 0:62
apply 6455023658: 4 len 7 page 0:62
apply 6455023668: 2 len 3 page 0:62
apply 6455023674: 4 len 3 page 0:62
Applying log to page 0:63
apply 6455023681: 4 len 7 page 0:63
apply 6455023691: 2 len 3 page 0:63
apply 6455023697: 4 len 7 page 0:63
apply 6455023707: 2 len 3 page 0:63
apply 6455023713: 4 len 3 page 0:63
Applying log to page 0:193
apply 6455023826: 4 len 7 page 0:193
apply 6455023837: 2 len 3 page 0:193
apply 6455023844: 4 len 7 page 0:193
apply 6455023855: 2 len 3 page 0:193
apply 6455023862: 4 len 3 page 0:193
Applying log to page 0:194
apply 6455023870: 4 len 7 page 0:194
apply 6455023881: 2 len 3 page 0:194
apply 6455023888: 4 len 7 page 0:194
apply 6455023899: 2 len 3 page 0:194
apply 6455023906: 4 len 3 page 0:194
Applying log to page 0:256
apply 6455026370: 4 len 7 page 0:256
apply 6455026381: 2 len 3 page 0:256
apply 6455026388: 4 len 7 page 0:256
apply 6455026399: 2 len 3 page 0:256
apply 6455026406: 4 len 3 page 0:256
Applying log to page 0:257
apply 6455026414: 4 len 7 page 0:257
apply 6455026425: 2 len 3 page 0:257
apply 6455026432: 4 len 7 page 0:257
apply 6455026443: 2 len 3 page 0:257
apply 6455026450: 4 len 3 page 0:257
Applying log to page 0:258
apply 6455026458: 4 len 7 page 0:258
apply 6455026469: 2 len 3 page 0:258
apply 6455026476: 4 len 7 page 0:258
apply 6455026487: 2 len 3 page 0:258
apply 6455026494: 4 len 3 page 0:258
Applying log to page 0:196
apply 6455023914: 4 len 7 page 0:196
apply 6455023925: 2 len 3 page 0:196
apply 6455023932: 4 len 7 page 0:196
apply 6455023943: 2 len 3 page 0:196
apply 6455023950: 4 len 3 page 0:196
Applying log to page 0:197
apply 6455023958: 4 len 7 page 0:197
apply 6455023969: 2 len 3 page 0:197
apply 6455023976: 4 len 7 page 0:197
apply 6455023987: 2 len 3 page 0:197
apply 6455023994: 4 len 3 page 0:197
Applying log to page 0:198
apply 6455024002: 4 len 7 page 0:198
apply 6455024013: 2 len 3 page 0:198
apply 6455024020: 4 len 7 page 0:198
apply 6455024031: 2 len 3 page 0:198
apply 6455024038: 4 len 3 page 0:198
Applying log to page 0:199
apply 6455024046: 4 len 7 page 0:199
apply 6455024057: 2 len 3 page 0:199
apply 6455024064: 4 len 7 page 0:199
apply 6455024075: 2 len 3 page 0:199
apply 6455024082: 4 len 3 page 0:199
Applying log to page 0:200
apply 6455024090: 4 len 7 page 0:200
apply 6455024101: 2 len 3 page 0:200
apply 6455024108: 4 len 7 page 0:200
apply 6455024119: 2 len 3 page 0:200
apply 6455024142: 4 len 3 page 0:200
Applying log to page 0:201
apply 6455024150: 4 len 7 page 0:201
apply 6455024161: 2 len 3 page 0:201
apply 6455024168: 4 len 7 page 0:201
apply 6455024179: 2 len 3 page 0:201
apply 6455024186: 4 len 3 page 0:201
Applying log to page 0:202
apply 6455024194: 4 len 7 page 0:202
apply 6455024205: 2 len 3 page 0:202
apply 6455024212: 4 len 7 page 0:202
apply 6455024223: 2 len 3 page 0:202
apply 6455024230: 4 len 3 page 0:202
Applying log to page 0:209
apply 6455024238: 4 len 7 page 0:209
apply 6455024249: 2 len 3 page 0:209
apply 6455024256: 4 len 7 page 0:209
apply 6455024267: 2 len 3 page 0:209
apply 6455024274: 4 len 3 page 0:209
Applying log to page 0:210
apply 6455024282: 4 len 7 page 0:210
apply 6455024293: 2 len 3 page 0:210
apply 6455024300: 4 len 7 page 0:210
apply 6455024311: 2 len 3 page 0:210
apply 6455024318: 4 len 3 page 0:210
Applying log to page 0:213
apply 6455024326: 4 len 7 page 0:213
apply 6455024337: 2 len 3 page 0:213
apply 6455024344: 4 len 7 page 0:213
apply 6455024355: 2 len 3 page 0:213
apply 6455024362: 4 len 3 page 0:213
Applying log to page 0:214
apply 6455024370: 4 len 7 page 0:214
apply 6455024381: 2 len 3 page 0:214
apply 6455024388: 4 len 7 page 0:214
apply 6455024399: 2 len 3 page 0:214
apply 6455024406: 4 len 3 page 0:214
Applying log to page 0:307
apply 6455019988: 9 len 49 page 0:307
Applying log to page 0:308
apply 6455020071: 9 len 50 page 0:308
Applying log to page 0:216
apply 6455024423: 4 len 7 page 0:216
apply 6455024434: 2 len 3 page 0:216
apply 6455024441: 4 len 7 page 0:216
apply 6455024452: 2 len 3 page 0:216
apply 6455024459: 4 len 3 page 0:216
Applying log to page 0:217
apply 6455024467: 4 len 7 page 0:217
apply 6455024478: 2 len 3 page 0:217
apply 6455024485: 4 len 7 page 0:217
apply 6455024496: 2 len 3 page 0:217
apply 6455024503: 4 len 3 page 0:217
Applying log to page 0:218
apply 6455024511: 4 len 7 page 0:218
apply 6455024522: 2 len 3 page 0:218
apply 6455024529: 4 len 7 page 0:218
apply 6455024540: 2 len 3 page 0:218
apply 6455024547: 4 len 3 page 0:218
Applying log to page 0:219
apply 6455024555: 4 len 7 page 0:219
apply 6455024566: 2 len 3 page 0:219
apply 6455024573: 4 len 7 page 0:219
apply 6455024584: 2 len 3 page 0:219
apply 6455024591: 4 len 3 page 0:219
Applying log to page 0:221
apply 6455024599: 4 len 7 page 0:221
apply 6455024610: 2 len 3 page 0:221
apply 6455024617: 4 len 7 page 0:221
apply 6455024628: 2 len 3 page 0:221
apply 6455024635: 4 len 3 page 0:221
Applying log to page 0:224
apply 6455024747: 4 len 7 page 0:224
apply 6455024758: 2 len 3 page 0:224
apply 6455024765: 4 len 7 page 0:224
apply 6455024776: 2 len 3 page 0:224
apply 6455024783: 4 len 3 page 0:224
Applying log to page 0:222
apply 6455024659: 4 len 7 page 0:222
apply 6455024670: 2 len 3 page 0:222
apply 6455024677: 4 len 7 page 0:222
apply 6455024688: 2 len 3 page 0:222
apply 6455024695: 4 len 3 page 0:222
Applying log to page 0:223
apply 6455024703: 4 len 7 page 0:223
apply 6455024714: 2 len 3 page 0:223
apply 6455024721: 4 len 7 page 0:223
apply 6455024732: 2 len 3 page 0:223
apply 6455024739: 4 len 3 page 0:223
Applying log to page 0:226
apply 6455024791: 4 len 7 page 0:226
apply 6455024802: 2 len 3 page 0:226
apply 6455024809: 4 len 7 page 0:226
apply 6455024820: 2 len 3 page 0:226
apply 6455024827: 4 len 3 page 0:226
Applying log to page 0:227
apply 6455024835: 4 len 7 page 0:227
apply 6455024846: 2 len 3 page 0:227
apply 6455024853: 4 len 7 page 0:227
apply 6455024864: 2 len 3 page 0:227
apply 6455024871: 4 len 3 page 0:227
Applying log to page 0:316
apply 6455023565: 4 len 7 page 0:316
apply 6455023597: 8 len 7 page 0:316
apply 6455023608: 4 len 7 page 0:316
Applying log to page 0:228
apply 6455024879: 4 len 7 page 0:228
apply 6455024890: 2 len 3 page 0:228
apply 6455024897: 4 len 7 page 0:228
apply 6455024908: 2 len 3 page 0:228
apply 6455024915: 4 len 3 page 0:228
Applying log to page 0:229
apply 6455024923: 4 len 7 page 0:229
apply 6455024934: 2 len 3 page 0:229
apply 6455024941: 4 len 7 page 0:229
apply 6455024952: 2 len 3 page 0:229
apply 6455024959: 4 len 3 page 0:229
Applying log to page 0:231
apply 6455024967: 4 len 7 page 0:231
apply 6455024978: 2 len 3 page 0:231
apply 6455024985: 4 len 7 page 0:231
apply 6455024996: 2 len 3 page 0:231
apply 6455025003: 4 len 3 page 0:231
Applying log to page 0:232
apply 6455025011: 4 len 7 page 0:232
apply 6455025022: 2 len 3 page 0:232
apply 6455025029: 4 len 7 page 0:232
apply 6455025040: 2 len 3 page 0:232
apply 6455025047: 4 len 3 page 0:232
Applying log to page 0:233
apply 6455025055: 4 len 7 page 0:233
apply 6455025066: 2 len 3 page 0:233
apply 6455025073: 4 len 7 page 0:233
apply 6455025084: 2 len 3 page 0:233
apply 6455025091: 4 len 3 page 0:233
Applying log to page 0:234
apply 6455025108: 4 len 7 page 0:234
apply 6455025119: 2 len 3 page 0:234
apply 6455025126: 4 len 7 page 0:234
apply 6455025137: 2 len 3 page 0:234
apply 6455025144: 4 len 3 page 0:234
Applying log to page 0:235
apply 6455025168: 4 len 7 page 0:235
apply 6455025179: 2 len 3 page 0:235
apply 6455025186: 4 len 7 page 0:235
apply 6455025197: 2 len 3 page 0:235
apply 6455025204: 4 len 3 page 0:235
Applying log to page 0:236
apply 6455025230: 4 len 4 page 0:236
apply 6455025238: 2 len 4 page 0:236
apply 6455025246: 4 len 3 page 0:236
apply 6455025254: 4 len 7 page 0:236
apply 6455025265: 2 len 3 page 0:236
apply 6455025272: 4 len 7 page 0:236
apply 6455025283: 2 len 3 page 0:236
apply 6455025290: 4 len 3 page 0:236
Applying log to page 0:237
apply 6455025316: 4 len 4 page 0:237
apply 6455025324: 2 len 4 page 0:237
apply 6455025332: 4 len 3 page 0:237
apply 6455025340: 4 len 7 page 0:237
apply 6455025351: 2 len 3 page 0:237
apply 6455025358: 4 len 7 page 0:237
apply 6455025369: 2 len 3 page 0:237
apply 6455025376: 4 len 3 page 0:237
Applying log to page 0:238
apply 6455025402: 4 len 4 page 0:238
apply 6455025410: 2 len 4 page 0:238
apply 6455025418: 4 len 3 page 0:238
apply 6455025426: 4 len 7 page 0:238
apply 6455025437: 2 len 3 page 0:238
apply 6455025444: 4 len 7 page 0:238
apply 6455025455: 2 len 3 page 0:238
apply 6455025462: 4 len 3 page 0:238
Applying log to page 0:239
apply 6455025470: 4 len 7 page 0:239
apply 6455025481: 2 len 3 page 0:239
apply 6455025488: 4 len 7 page 0:239
apply 6455025499: 2 len 3 page 0:239
apply 6455025506: 4 len 3 page 0:239
Applying log to page 0:240
apply 6455025514: 4 len 7 page 0:240
apply 6455025525: 2 len 3 page 0:240
apply 6455025532: 4 len 7 page 0:240
apply 6455025543: 2 len 3 page 0:240
apply 6455025550: 4 len 3 page 0:240
Applying log to page 0:241
apply 6455025558: 4 len 7 page 0:241
apply 6455025569: 2 len 3 page 0:241
apply 6455025576: 4 len 7 page 0:241
apply 6455025587: 2 len 3 page 0:241
apply 6455025594: 4 len 3 page 0:241
Applying log to page 0:245
apply 6455025602: 4 len 7 page 0:245
apply 6455025613: 2 len 3 page 0:245
apply 6455025620: 4 len 7 page 0:245
apply 6455025631: 2 len 3 page 0:245
apply 6455025638: 4 len 3 page 0:245
Applying log to page 0:246
apply 6455025646: 4 len 7 page 0:246
apply 6455025657: 2 len 3 page 0:246
apply 6455025680: 4 len 7 page 0:246
apply 6455025691: 2 len 3 page 0:246
apply 6455025698: 4 len 3 page 0:246
Applying log to page 0:247
apply 6455025706: 4 len 7 page 0:247
apply 6455025717: 2 len 3 page 0:247
apply 6455025724: 4 len 7 page 0:247
apply 6455025735: 2 len 3 page 0:247
apply 6455025742: 4 len 3 page 0:247
Applying log to page 0:248
apply 6455025750: 4 len 7 page 0:248
apply 6455025761: 2 len 3 page 0:248
apply 6455025768: 4 len 7 page 0:248
apply 6455025779: 2 len 3 page 0:248
apply 6455025786: 4 len 3 page 0:248
Applying log to page 0:249
apply 6455025794: 4 len 7 page 0:249
apply 6455025805: 2 len 3 page 0:249
apply 6455025812: 4 len 7 page 0:249
apply 6455025823: 2 len 3 page 0:249
apply 6455025830: 4 len 3 page 0:249
Applying log to page 0:250
apply 6455025856: 4 len 4 page 0:250
apply 6455025864: 2 len 4 page 0:250
apply 6455025872: 4 len 3 page 0:250
apply 6455025880: 4 len 7 page 0:250
apply 6455025891: 2 len 3 page 0:250
apply 6455025898: 4 len 7 page 0:250
apply 6455025909: 2 len 3 page 0:250
apply 6455025916: 4 len 3 page 0:250
Applying log to page 0:251
apply 6455025942: 4 len 4 page 0:251
apply 6455025950: 2 len 4 page 0:251
apply 6455025958: 4 len 3 page 0:251
apply 6455025966: 4 len 7 page 0:251
apply 6455025977: 2 len 3 page 0:251
apply 6455025984: 4 len 7 page 0:251
apply 6455025995: 2 len 3 page 0:251
apply 6455026002: 4 len 3 page 0:251
Applying log to page 0:252
apply 6455026028: 4 len 4 page 0:252
apply 6455026036: 2 len 4 page 0:252
apply 6455026044: 4 len 3 page 0:252
apply 6455026052: 4 len 7 page 0:252
apply 6455026063: 2 len 3 page 0:252
apply 6455026070: 4 len 7 page 0:252
apply 6455026081: 2 len 3 page 0:252
apply 6455026088: 4 len 3 page 0:252
Applying log to page 0:253
apply 6455026114: 4 len 4 page 0:253
apply 6455026122: 2 len 4 page 0:253
apply 6455026130: 4 len 3 page 0:253
apply 6455026138: 4 len 7 page 0:253
apply 6455026149: 2 len 3 page 0:253
apply 6455026156: 4 len 7 page 0:253
apply 6455026167: 2 len 3 page 0:253
apply 6455026190: 4 len 3 page 0:253
Applying log to page 0:254
apply 6455026216: 4 len 4 page 0:254
apply 6455026224: 2 len 4 page 0:254
apply 6455026232: 4 len 3 page 0:254
apply 6455026240: 4 len 7 page 0:254
apply 6455026251: 2 len 3 page 0:254
apply 6455026258: 4 len 7 page 0:254
apply 6455026269: 2 len 3 page 0:254
apply 6455026276: 4 len 3 page 0:254
Applying log to page 0:255
apply 6455026302: 4 len 4 page 0:255
apply 6455026310: 2 len 4 page 0:255
apply 6455026318: 4 len 3 page 0:255
apply 6455026326: 4 len 7 page 0:255
apply 6455026337: 2 len 3 page 0:255
apply 6455026344: 4 len 7 page 0:255
apply 6455026355: 2 len 3 page 0:255
apply 6455026362: 4 len 3 page 0:255
Applying log to page 0:518
apply 6455026096: 4 len 7 page 0:518
apply 6455026107: 2 len 3 page 0:518
Applying log to page 0:553
apply 6455025298: 4 len 7 page 0:553
apply 6455025309: 2 len 3 page 0:553
Applying log to page 0:555
apply 6455026198: 4 len 7 page 0:555
apply 6455026209: 2 len 3 page 0:555
Applying log to page 0:465
apply 6455026284: 4 len 7 page 0:465
apply 6455026295: 2 len 3 page 0:465
Applying log to page 0:774
apply 6455025212: 4 len 7 page 0:774
apply 6455025223: 2 len 3 page 0:774
Applying log to page 0:487
apply 6455025924: 4 len 7 page 0:487
apply 6455025935: 2 len 3 page 0:487
Applying log to page 0:1784
apply 6455025838: 4 len 7 page 0:1784
apply 6455025849: 2 len 3 page 0:1784
Applying log to page 0:1785
apply 6455026010: 4 len 7 page 0:1785
apply 6455026021: 2 len 3 page 0:1785
180715 19:29:22 completed OK!

Then stop MariaDB server, remove the content of the datadir and apply --move-back:

openxs@ao756: ~/dbs/maria10.2$ rm -rf ~/backup
openxs@ao756: bin/mariabackup --no-defaults -uroot --no-version-ccheck --verbose --datadir=/home/openxs/dbs/maria10.2/data --target-dir=/home/opennxs/backup --move-back 
bin/mariabackup based on MariaDB server 10.2.17-MariaDB Linux (x86_64) 
180715 19:29:47 [01] Moving ibdata1 to /home/openxs/dbs/maria10.2/data/ibdata1
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone.MYI to /home/openxs/dbs/maria10.2/data/mysql/time_zone.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/func.MYI to /home/openxs/dbs/maria10.2/data/mysql/func.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/procs_priv.frm to /home/openxs/dbs/maria10.2/data/mysql/procs_priv.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/user.frm to /home/openxs/dbs/maria10.2/data/mysql/user.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/host.frm to /home/openxs/dbs/maria10.2/data/mysql/host.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/tables_priv.MYI to /home/openxs/dbs/maria10.2/data/mysql/tables_priv.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/innodb_table_stats.ibd to /home/openxs/dbs/maria10.2/data/mysql/innodb_table_stats.ibd
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_transition.MYI to /home/openxs/dbs/maria10.2/data/mysql/time_zone_transition.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_keyword.frm to /home/openxs/dbs/maria10.2/data/mysql/help_keyword.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/innodb_table_stats.frm to /home/openxs/dbs/maria10.2/data/mysql/innodb_table_stats.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_keyword.MYI to /home/openxs/dbs/maria10.2/data/mysql/help_keyword.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/plugin.MYI to /home/openxs/dbs/maria10.2/data/mysql/plugin.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/columns_priv.MYI to /home/openxs/dbs/maria10.2/data/mysql/columns_priv.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/db.frm to /home/openxs/dbs/maria10.2/data/mysql/db.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_relation.frm to /home/openxs/dbs/maria10.2/data/mysql/help_relation.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/tables_priv.MYD to /home/openxs/dbs/maria10.2/data/mysql/tables_priv.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/event.frm to /home/openxs/dbs/maria10.2/data/mysql/event.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/columns_priv.frm to /home/openxs/dbs/maria10.2/data/mysql/columns_priv.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/proc.MYI to /home/openxs/dbs/maria10.2/data/mysql/proc.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_transition.MYD to /home/openxs/dbs/maria10.2/data/mysql/time_zone_transition.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/innodb_index_stats.frm to /home/openxs/dbs/maria10.2/data/mysql/innodb_index_stats.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/columns_priv.MYD to /home/openxs/dbs/maria10.2/data/mysql/columns_priv.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_transition.frm to /home/openxs/dbs/maria10.2/data/mysql/time_zone_transition.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/servers.MYI to /home/openxs/dbs/maria10.2/data/mysql/servers.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/column_stats.MYI to /home/openxs/dbs/maria10.2/data/mysql/column_stats.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/table_stats.frm to /home/openxs/dbs/maria10.2/data/mysql/table_stats.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/proxies_priv.frm to /home/openxs/dbs/maria10.2/data/mysql/proxies_priv.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/gtid_slave_pos.frm to /home/openxs/dbs/maria10.2/data/mysql/gtid_slave_pos.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_leap_second.frm to /home/openxs/dbs/maria10.2/data/mysql/time_zone_leap_second.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/roles_mapping.MYD to /home/openxs/dbs/maria10.2/data/mysql/roles_mapping.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/func.frm to /home/openxs/dbs/maria10.2/data/mysql/func.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/host.MYD to /home/openxs/dbs/maria10.2/data/mysql/host.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/general_log.CSM to /home/openxs/dbs/maria10.2/data/mysql/general_log.CSM
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/slow_log.CSM to /home/openxs/dbs/maria10.2/data/mysql/slow_log.CSM
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_leap_second.MYD to /home/openxs/dbs/maria10.2/data/mysql/time_zone_leap_second.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/slow_log.frm to /home/openxs/dbs/maria10.2/data/mysql/slow_log.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/host.MYI to /home/openxs/dbs/maria10.2/data/mysql/host.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_topic.frm to /home/openxs/dbs/maria10.2/data/mysql/help_topic.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/innodb_index_stats.ibd to /home/openxs/dbs/maria10.2/data/mysql/innodb_index_stats.ibd
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_topic.MYI to /home/openxs/dbs/maria10.2/data/mysql/help_topic.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_name.frm to /home/openxs/dbs/maria10.2/data/mysql/time_zone_name.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/servers.MYD to /home/openxs/dbs/maria10.2/data/mysql/servers.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/roles_mapping.frm to /home/openxs/dbs/maria10.2/data/mysql/roles_mapping.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/user.MYI to /home/openxs/dbs/maria10.2/data/mysql/user.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/plugin.MYD to /home/openxs/dbs/maria10.2/data/mysql/plugin.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/general_log.frm to /home/openxs/dbs/maria10.2/data/mysql/general_log.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/event.MYD to /home/openxs/dbs/maria10.2/data/mysql/event.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/db.MYD to /home/openxs/dbs/maria10.2/data/mysql/db.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_name.MYD to /home/openxs/dbs/maria10.2/data/mysql/time_zone_name.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/slow_log.CSV to /home/openxs/dbs/maria10.2/data/mysql/slow_log.CSV
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_category.MYD to /home/openxs/dbs/maria10.2/data/mysql/help_category.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/column_stats.MYD to /home/openxs/dbs/maria10.2/data/mysql/column_stats.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_keyword.MYD to /home/openxs/dbs/maria10.2/data/mysql/help_keyword.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/procs_priv.MYI to /home/openxs/dbs/maria10.2/data/mysql/procs_priv.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_relation.MYI to /home/openxs/dbs/maria10.2/data/mysql/help_relation.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/gtid_slave_pos.ibd to /home/openxs/dbs/maria10.2/data/mysql/gtid_slave_pos.ibd
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/tables_priv.frm to /home/openxs/dbs/maria10.2/data/mysql/tables_priv.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/proc.MYD to /home/openxs/dbs/maria10.2/data/mysql/proc.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/index_stats.MYD to /home/openxs/dbs/maria10.2/data/mysql/index_stats.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/table_stats.MYI to /home/openxs/dbs/maria10.2/data/mysql/table_stats.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_name.MYI to /home/openxs/dbs/maria10.2/data/mysql/time_zone_name.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/general_log.CSV to /home/openxs/dbs/maria10.2/data/mysql/general_log.CSV
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/index_stats.frm to /home/openxs/dbs/maria10.2/data/mysql/index_stats.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_transition_type.MYI to /home/openxs/dbs/maria10.2/data/mysql/time_zone_transition_type.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/column_stats.frm to /home/openxs/dbs/maria10.2/data/mysql/column_stats.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/plugin.frm to /home/openxs/dbs/maria10.2/data/mysql/plugin.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/index_stats.MYI to /home/openxs/dbs/maria10.2/data/mysql/index_stats.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_leap_second.MYI to /home/openxs/dbs/maria10.2/data/mysql/time_zone_leap_second.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_topic.MYD to /home/openxs/dbs/maria10.2/data/mysql/help_topic.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_category.MYI to /home/openxs/dbs/maria10.2/data/mysql/help_category.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/servers.frm to /home/openxs/dbs/maria10.2/data/mysql/servers.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/event.MYI to /home/openxs/dbs/maria10.2/data/mysql/event.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/proc.frm to /home/openxs/dbs/maria10.2/data/mysql/proc.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_transition_type.MYD to /home/openxs/dbs/maria10.2/data/mysql/time_zone_transition_type.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone.frm to /home/openxs/dbs/maria10.2/data/mysql/time_zone.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_category.frm to /home/openxs/dbs/maria10.2/data/mysql/help_category.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/func.MYD to /home/openxs/dbs/maria10.2/data/mysql/func.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/proxies_priv.MYD to /home/openxs/dbs/maria10.2/data/mysql/proxies_priv.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone.MYD to /home/openxs/dbs/maria10.2/data/mysql/time_zone.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/help_relation.MYD to /home/openxs/dbs/maria10.2/data/mysql/help_relation.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/roles_mapping.MYI to /home/openxs/dbs/maria10.2/data/mysql/roles_mapping.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/proxies_priv.MYI to /home/openxs/dbs/maria10.2/data/mysql/proxies_priv.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/user.MYD to /home/openxs/dbs/maria10.2/data/mysql/user.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/table_stats.MYD to /home/openxs/dbs/maria10.2/data/mysql/table_stats.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/time_zone_transition_type.frm to /home/openxs/dbs/maria10.2/data/mysql/time_zone_transition_type.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/procs_priv.MYD to /home/openxs/dbs/maria10.2/data/mysql/procs_priv.MYD
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./mysql/db.MYI to /home/openxs/dbs/maria10.2/data/mysql/db.MYI
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./aria_log.00000001 to /home/openxs/dbs/maria10.2/data/aria_log.00000001
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./test/tmp_t1.frm to /home/openxs/dbs/maria10.2/data/test/tmp_t1.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./test/t.frm to /home/openxs/dbs/maria10.2/data/test/t.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./test/tbig.frm to /home/openxs/dbs/maria10.2/data/test/tbig.frm
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./test/t.ibd to /home/openxs/dbs/maria10.2/data/test/t.ibd
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./test/tbig.ibd to /home/openxs/dbs/maria10.2/data/test/tbig.ibd
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./test/db.opt to /home/openxs/dbs/maria10.2/data/test/db.opt
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./aria_log_control to /home/openxs/dbs/maria10.2/data/aria_log_control
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./xtrabackup_info to /home/openxs/dbs/maria10.2/data/xtrabackup_info
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./performance_schema/db.opt to /home/openxs/dbs/maria10.2/data/performance_schema/db.opt
180715 19:29:47 [01]        ...done
180715 19:29:47 [01] Moving ./ib_buffer_pool to /home/openxs/dbs/maria10.2/data/ib_buffer_pool
180715 19:29:47 [01]        ...done
180715 19:29:47 completed OK!

Now, if you start server with the datadir content restored from the backup, maybe depending on time to start the loop vs backup process, you can get the following outcome:

Some table tmp_t{$i} exists and can not be accessed.

openxs@ao756:~/dbs/maria10.2$ bin/mysql -uroot --socket=/tmp/mysql.sock test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 10.2.17-MariaDB Source distribution
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [test]> show tables;
+----------------+
| Tables_in_test |
+----------------+
| t              |
| tbig           |
| tmp_t1         |
+----------------+
3 rows in set (0.00 sec)
 
MariaDB [test]> select count(*) from tmp_t1;
ERROR 1932 (42S02): Table 'test.tmp_t1' doesn't exist in engine

In this case in the error log we see the following:

Version: '10.2.17-MariaDB'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
2018-07-15 19:30:01 139688247625472 [ERROR] InnoDB: Failed to find tablespace for table `test`.`tmp_t1` in the cache. Attempting to load the tablespace with space id 430
2018-07-15 19:30:01 139688247625472 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2018-07-15 19:30:01 139688247625472 [ERROR] InnoDB: The error means the system cannot find the path specified.
2018-07-15 19:30:01 139688247625472 [ERROR] InnoDB: Cannot open datafile for read-only: './test/tmp_t1.ibd' OS error: 71
2018-07-15 19:30:01 139688247625472 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2018-07-15 19:30:01 139688247625472 [ERROR] InnoDB: The error means the system cannot find the path specified.
2018-07-15 19:30:01 139688247625472 [ERROR] InnoDB: Could not find a valid tablespace file for `test/tmp_t1`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.

MDL lock can not protect the table that had not existed at the moment when MDL locks were set.

The original instance we do not have these problems after we stop rename loop at any stage.

I've used MariaDB 10.2.17 built from current source for my tests (this way I get som,e xtra diagnostic outputs for --prepare stage, for example):

openxs@ao756:~/git/server$ git branch
  10.0
  10.1
* 10.2
  10.3
openxs@ao756:~/git/server$ git log -1
commit 1cc1d0429da14a041a6240c6fce17e0d31cad8e2
Author: Marko Mцєkelцє <marko.makela@mariadb.com>
Date:   Sat Jul 7 11:34:26 2018 +0300
 
    MDEV-16664: Change the default to innodb_lock_schedule_algorithm=fcfs
 
    The parameter innodb_lock_schedule_algorithm was introduced in
    MariaDB Server 10.1.19, 10.2.13, 10.3.4 as part of MDEV-11039.
    In MariaDB 10.1, the default value of the parameter is 'fcfs',
    that is, the existing algorithm is used by default. But in
    later versions of MariaDB Server, the parameter was 'vats',
    enabling the new algorithm.
 
    Because the new algorithm is triggering a debug assertion failure
    that suggests corruption of the transactional lock data structures,
    we will revert to the old algorithm by default until we have
    resolved the problem.
openxs@ao756:~/git/server$ git pull
Already up-to-date.

But the problem happens with 10.2.16 as well.



 Comments   
Comment by Vladislav Vaintroub [ 2018-07-15 ]

Can you please use --ddl-lock-per-table throughout? and only file bugs for that? Because otherwise, the bug description is hard to read, places like "depending on --lock-ddl-per-table used or not" are not very helpful for the reader.

I'd say I would expect some weirdness if --ddl-lock-per-table is not used.

Comment by Valerii Kravchuk [ 2018-07-15 ]

I removed description of problems that happened without --lock-dll-per-table, to be more specific.

As a side mote, I'd expect at least error messages with whatever set of options at backup stage, when there is a chance to get inconsistent backup.

Comment by Vladislav Vaintroub [ 2018-07-15 ]

Is backup consistent, if you remove tmp_t1.frm?
As a side note, poor marko gets misspelled really heavy in git in Ukrainian Linux.

Comment by Valerii Kravchuk [ 2018-07-15 ]

Sorry, done with testing for tonight. Probably it is consistent, but imagine the case when the table had not existed at the moment of setting MDL locks, then was created and involved in RENAME and then is expected to exist after RENAME? How dropping .frm for it is going to help?

My idea was to create a simple test case that would let anyone to check whatever variations of it or fixes they may get in mind.

Comment by Vladislav Vaintroub [ 2018-07-15 ]

Well, lock-ddl-per-table can only do what it can do, and what it can do is limited to tables that are present when backup starts. The other option is not-implemented "backup locks" that block all DDLs. MariaDB does not have that, but there is a request MDEV-12031

Comment by Manjot Singh (Inactive) [ 2018-07-15 ]

I ran this test in 10.2 and replicated it. I then wiped the data and did it again in 10.3 and the same errors occur.

MariaDB [(none)]> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
MariaDB [test]> show tables;
+----------------+
| Tables_in_test |
+----------------+
| t              |
| tbig           |
| tmp_t3         |
+----------------+
3 rows in set (0.000 sec)
 
MariaDB [test]> select count(*) from tmp_t3;
ERROR 1932 (42S02): Table 'test.tmp_t3' doesn't exist in engine
MariaDB [test]> select @@version;
+----------------+
| @@version      |
+----------------+
| 10.3.8-MariaDB |
+----------------+
1 row in set (0.000 sec)

Error log:

Jul 15 20:27:33 ip-10-0-0-158 mysqld: 2018-07-15 20:27:33 8 [ERROR] InnoDB: Failed to find tablespace for table `test`.`tmp_t3` in the cache. Attempting to load the tablespace with space id 10
Jul 15 20:27:33 ip-10-0-0-158 mysqld: 2018-07-15 20:27:33 8 [ERROR] InnoDB: Operating system error number 2 in a file operation.
Jul 15 20:27:33 ip-10-0-0-158 mysqld: 2018-07-15 20:27:33 8 [ERROR] InnoDB: The error means the system cannot find the path specified.
Jul 15 20:27:33 ip-10-0-0-158 mysqld: 2018-07-15 20:27:33 8 [ERROR] InnoDB: Cannot open datafile for read-only: './test/tmp_t3.ibd' OS error: 71
Jul 15 20:27:33 ip-10-0-0-158 mysqld: 2018-07-15 20:27:33 8 [ERROR] InnoDB: Operating system error number 2 in a file operation.
Jul 15 20:27:33 ip-10-0-0-158 mysqld: 2018-07-15 20:27:33 8 [ERROR] InnoDB: The error means the system cannot find the path specified.
Jul 15 20:27:33 ip-10-0-0-158 mysqld: 2018-07-15 20:27:33 8 [ERROR] InnoDB: Could not find a valid tablespace file for ``test`.`tmp_t3``. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.

Comment by Vladislav Vaintroub [ 2018-07-15 ]

InnoDB: Tablespace 430 was not found at ./test/tmp_t1.ibd when restoring a (partial?) backup. All redo log for this file will be ignored!

this is odd during prepare

Comment by Manjot Singh (Inactive) [ 2018-07-17 ]

I've rerun the same test with MariaDB 10.2 and XtraBackup 2.4.12-1

With old_alter_table=1:

[root@ip-10-0-0-158 ~]# xtrabackup -uroot --no-version-check --verbose --backup --lock-ddl-per-table --target-dir=/backup/manjot4/
xtrabackup: recognized server arguments: 
xtrabackup: recognized client arguments: --user=root --no-version-check=1 --backup=1 --lock-ddl-per-table=1 --target-dir=/backup/manjot4/ 
180717 20:48:48 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: not set
Using server version 10.2.16-MariaDB
xtrabackup version 2.4.12 based on MySQL server 5.7.19 Linux (x86_64) (revision id: 170eb8c)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql/
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
InnoDB: Number of pools: 1
180717 20:48:48 >> log scanned up to (545264729)
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 7 for benchmarking1/sbtest1, old maximum was 0
180717 20:48:49 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: not set
180717 20:48:49 [01] Copying ./ibdata1 to /backup/manjot4/ibdata1
180717 20:48:49 [01]        ...done
180717 20:48:49 Locking MDL for benchmarking1.sbtest1
180717 20:48:49 [01] Copying ./benchmarking1/sbtest1.ibd to /backup/manjot4/benchmarking1/sbtest1.ibd
180717 20:48:49 >> log scanned up to (545291532)
180717 20:48:50 [01]        ...done
180717 20:48:50 Locking MDL for benchmarking1.em_agg_group_prediction
Error: failed to fetch query result SELECT * FROM benchmarking1.em_agg_group_prediction LIMIT 1: Table definition has changed, please retry transaction

Without old_alter_table=1:
xtrabackup succeeds at all steps and the tmp table doesn't exist in the restore. but it is not consistent.

[root@ip-10-0-0-158 ~]# xtrabackup -uroot --no-version-check --verbose --backup --lock-ddl-per-table --target-dir=/backup/manjot6/
xtrabackup: recognized server arguments: 
xtrabackup: recognized client arguments: --user=root --no-version-check=1 --backup=1 --lock-ddl-per-table=1 --target-dir=/backup/manjot6/ 
180717 20:52:47 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: not set
Using server version 10.2.16-MariaDB
xtrabackup version 2.4.12 based on MySQL server 5.7.19 Linux (x86_64) (revision id: 170eb8c)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql/
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
InnoDB: Number of pools: 1
180717 20:52:47 >> log scanned up to (546542833)
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 7 for benchmarking1/sbtest1, old maximum was 0
180717 20:52:48 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: not set
180717 20:52:48 [01] Copying ./ibdata1 to /backup/manjot6/ibdata1
180717 20:52:48 [01]        ...done
180717 20:52:48 Locking MDL for benchmarking1.sbtest1
180717 20:52:48 [01] Copying ./benchmarking1/sbtest1.ibd to /backup/manjot6/benchmarking1/sbtest1.ibd
180717 20:52:48 >> log scanned up to (546568888)
180717 20:52:49 >> log scanned up to (546576242)
180717 20:52:50 [01]        ...done
180717 20:52:50 >> log scanned up to (546579248)
180717 20:52:51 Locking MDL for benchmarking1.zem_a41
180717 20:52:51 [01] Copying ./benchmarking1/em_agg_group_prediction.ibd to /backup/manjot6/benchmarking1/em_agg_group_prediction.ibd
180717 20:52:51 [01]        ...done
180717 20:52:51 Locking MDL for mysql.gtid_slave_pos
180717 20:52:51 [01] Copying ./mysql/gtid_slave_pos.ibd to /backup/manjot6/mysql/gtid_slave_pos.ibd
180717 20:52:51 [01]        ...done
180717 20:52:51 Locking MDL for mysql.innodb_index_stats
180717 20:52:51 [01] Copying ./mysql/innodb_index_stats.ibd to /backup/manjot6/mysql/innodb_index_stats.ibd
180717 20:52:51 [01]        ...done
180717 20:52:51 Locking MDL for mysql.innodb_table_stats
180717 20:52:51 [01] Copying ./mysql/innodb_table_stats.ibd to /backup/manjot6/mysql/innodb_table_stats.ibd
180717 20:52:51 [01]        ...done
180717 20:52:51 Starting to backup non-InnoDB tables and files
180717 20:52:51 [01] Copying ./benchmarking1/db.opt to /backup/manjot6/benchmarking1/db.opt
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./benchmarking1/sbtest1.frm to /backup/manjot6/benchmarking1/sbtest1.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./benchmarking1/zem_a41.frm to /backup/manjot6/benchmarking1/zem_a41.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./benchmarking1/em_agg_group_prediction.frm to /backup/manjot6/benchmarking1/em_agg_group_prediction.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/roles_mapping.MYI to /backup/manjot6/mysql/roles_mapping.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/column_stats.MYD to /backup/manjot6/mysql/column_stats.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/table_stats.MYI to /backup/manjot6/mysql/table_stats.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/column_stats.MYI to /backup/manjot6/mysql/column_stats.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/table_stats.frm to /backup/manjot6/mysql/table_stats.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/column_stats.frm to /backup/manjot6/mysql/column_stats.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/tables_priv.MYD to /backup/manjot6/mysql/tables_priv.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/columns_priv.MYD to /backup/manjot6/mysql/columns_priv.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/tables_priv.MYI to /backup/manjot6/mysql/tables_priv.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/columns_priv.MYI to /backup/manjot6/mysql/columns_priv.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/tables_priv.frm to /backup/manjot6/mysql/tables_priv.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/columns_priv.frm to /backup/manjot6/mysql/columns_priv.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/db.MYD to /backup/manjot6/mysql/db.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/db.MYI to /backup/manjot6/mysql/db.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/db.frm to /backup/manjot6/mysql/db.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/event.MYD to /backup/manjot6/mysql/event.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/event.MYI to /backup/manjot6/mysql/event.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/event.frm to /backup/manjot6/mysql/event.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/func.MYD to /backup/manjot6/mysql/func.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/func.MYI to /backup/manjot6/mysql/func.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/func.frm to /backup/manjot6/mysql/func.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone.MYD to /backup/manjot6/mysql/time_zone.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/general_log.CSM to /backup/manjot6/mysql/general_log.CSM
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone.MYI to /backup/manjot6/mysql/time_zone.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/general_log.CSV to /backup/manjot6/mysql/general_log.CSV
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone.frm to /backup/manjot6/mysql/time_zone.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/general_log.frm to /backup/manjot6/mysql/general_log.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_leap_second.MYD to /backup/manjot6/mysql/time_zone_leap_second.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/gtid_slave_pos.frm to /backup/manjot6/mysql/gtid_slave_pos.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_leap_second.MYI to /backup/manjot6/mysql/time_zone_leap_second.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_leap_second.frm to /backup/manjot6/mysql/time_zone_leap_second.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_category.MYD to /backup/manjot6/mysql/help_category.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_name.MYD to /backup/manjot6/mysql/time_zone_name.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_category.MYI to /backup/manjot6/mysql/help_category.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_name.MYI to /backup/manjot6/mysql/time_zone_name.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_category.frm to /backup/manjot6/mysql/help_category.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_name.frm to /backup/manjot6/mysql/time_zone_name.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_keyword.MYD to /backup/manjot6/mysql/help_keyword.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_transition.MYD to /backup/manjot6/mysql/time_zone_transition.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_keyword.MYI to /backup/manjot6/mysql/help_keyword.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_transition.MYI to /backup/manjot6/mysql/time_zone_transition.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_keyword.frm to /backup/manjot6/mysql/help_keyword.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_transition.frm to /backup/manjot6/mysql/time_zone_transition.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_relation.MYD to /backup/manjot6/mysql/help_relation.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/user.MYI to /backup/manjot6/mysql/user.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_relation.MYI to /backup/manjot6/mysql/help_relation.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/user.MYD to /backup/manjot6/mysql/user.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_relation.frm to /backup/manjot6/mysql/help_relation.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/user.frm to /backup/manjot6/mysql/user.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_topic.MYD to /backup/manjot6/mysql/help_topic.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_topic.MYI to /backup/manjot6/mysql/help_topic.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/help_topic.frm to /backup/manjot6/mysql/help_topic.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/host.MYD to /backup/manjot6/mysql/host.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/host.MYI to /backup/manjot6/mysql/host.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/host.frm to /backup/manjot6/mysql/host.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/index_stats.MYD to /backup/manjot6/mysql/index_stats.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/index_stats.MYI to /backup/manjot6/mysql/index_stats.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/index_stats.frm to /backup/manjot6/mysql/index_stats.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_transition_type.MYD to /backup/manjot6/mysql/time_zone_transition_type.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/innodb_index_stats.frm to /backup/manjot6/mysql/innodb_index_stats.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/proxies_priv.MYI to /backup/manjot6/mysql/proxies_priv.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/proxies_priv.frm to /backup/manjot6/mysql/proxies_priv.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/innodb_table_stats.frm to /backup/manjot6/mysql/innodb_table_stats.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/roles_mapping.MYD to /backup/manjot6/mysql/roles_mapping.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/plugin.MYD to /backup/manjot6/mysql/plugin.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/plugin.MYI to /backup/manjot6/mysql/plugin.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/plugin.frm to /backup/manjot6/mysql/plugin.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/proc.MYD to /backup/manjot6/mysql/proc.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/proc.MYI to /backup/manjot6/mysql/proc.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/proc.frm to /backup/manjot6/mysql/proc.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/procs_priv.MYD to /backup/manjot6/mysql/procs_priv.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/procs_priv.MYI to /backup/manjot6/mysql/procs_priv.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/procs_priv.frm to /backup/manjot6/mysql/procs_priv.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/proxies_priv.MYD to /backup/manjot6/mysql/proxies_priv.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/roles_mapping.frm to /backup/manjot6/mysql/roles_mapping.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/servers.MYD to /backup/manjot6/mysql/servers.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/servers.MYI to /backup/manjot6/mysql/servers.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/servers.frm to /backup/manjot6/mysql/servers.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/slow_log.CSM to /backup/manjot6/mysql/slow_log.CSM
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/slow_log.CSV to /backup/manjot6/mysql/slow_log.CSV
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/slow_log.frm to /backup/manjot6/mysql/slow_log.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/table_stats.MYD to /backup/manjot6/mysql/table_stats.MYD
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_transition_type.MYI to /backup/manjot6/mysql/time_zone_transition_type.MYI
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./mysql/time_zone_transition_type.frm to /backup/manjot6/mysql/time_zone_transition_type.frm
180717 20:52:51 [01]        ...done
180717 20:52:51 [01] Copying ./performance_schema/db.opt to /backup/manjot6/performance_schema/db.opt
180717 20:52:51 [01]        ...done
180717 20:52:51 Finished backing up non-InnoDB tables and files
180717 20:52:51 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '546353499'
xtrabackup: Stopping log copying thread.
.180717 20:52:51 >> log scanned up to (546589496)
 
180717 20:52:51 Executing UNLOCK TABLES
180717 20:52:51 All tables unlocked
180717 20:52:51 [00] Copying ib_buffer_pool to /backup/manjot6/ib_buffer_pool
180717 20:52:51 [00]        ...done
180717 20:52:51 Backup created in directory '/backup/manjot6/'
180717 20:52:51 [00] Writing /backup/manjot6/backup-my.cnf
180717 20:52:51 [00]        ...done
180717 20:52:51 [00] Writing /backup/manjot6/xtrabackup_info
180717 20:52:51 [00]        ...done
180717 20:52:51 Unlocking MDL for all tablesxtrabackup: Transaction log of lsn (546353499) to (546589496) was copied.
180717 20:52:51 completed OK!
[root@ip-10-0-0-158 ~]# xtrabackup -uroot --no-version-check --verbose --prepare --target-dir=/backup/manjot5/
xtrabackup: recognized server arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:12M:autoextend --innodb_log_files_in_group=2 --innodb_log_file_size=50331648 --innodb_fast_checksum=0 --innodb_page_size=16384 --innodb_log_block_size=512 --innodb_undo_directory=./ --innodb_undo_tablespaces=0 --server-id=0 --redo-log-version=1 
xtrabackup: recognized client arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:12M:autoextend --innodb_log_files_in_group=2 --innodb_log_file_size=50331648 --innodb_fast_checksum=0 --innodb_page_size=16384 --innodb_log_block_size=512 --innodb_undo_directory=./ --innodb_undo_tablespaces=0 --server-id=0 --redo-log-version=1 --user=root --no-version-check=1 --prepare=1 --target-dir=/backup/manjot5/ 
xtrabackup version 2.4.12 based on MySQL server 5.7.19 Linux (x86_64) (revision id: 170eb8c)
xtrabackup: cd to /backup/manjot5/
xtrabackup: This target seems to be not prepared yet.
InnoDB: Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=8388608, start_lsn=(545459152)
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = .
xtrabackup:   innodb_log_files_in_group = 1
xtrabackup:   innodb_log_file_size = 8388608
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = .
xtrabackup:   innodb_log_files_in_group = 1
xtrabackup:   innodb_log_file_size = 8388608
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: PUNCH HOLE support available
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
InnoDB: Compressed tables use zlib 1.2.7
InnoDB: Number of pools: 1
InnoDB: Using CPU crc32 instructions
InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M
InnoDB: Completed initialization of buffer pool
InnoDB: page_cleaner coordinator priority: -20
InnoDB: Highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 545459152
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 236, since the redo log references ./benchmarking1/em_agg_group_prediction.ibd with space ID 227.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 228. Another data file called ./benchmarking1/tmp_a0.ibd exists with the same space ID.
InnoDB: Cannot rename './benchmarking1/tmp_a0.ibd' to './benchmarking1/em_agg_group_prediction.ibd' for space ID 228 because the target file exists. Remove the target file and try again.
InnoDB:  Cannot replay file rename. Remove either file and try again.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 228. Another data file called ./benchmarking1/tmp_a0.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/zem_a1.ibd' with space ID 228. Another data file called ./benchmarking1/tmp_a0.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 229. Another data file called ./benchmarking1/tmp_a1.ibd exists with the same space ID.
InnoDB: Cannot rename './benchmarking1/tmp_a1.ibd' to './benchmarking1/em_agg_group_prediction.ibd' for space ID 229 because the target file exists. Remove the target file and try again.
InnoDB:  Cannot replay file rename. Remove either file and try again.
InnoDB: Cannot delete tablespace 228 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 229. Another data file called ./benchmarking1/tmp_a1.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/zem_a2.ibd' with space ID 229. Another data file called ./benchmarking1/tmp_a1.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 230. Another data file called ./benchmarking1/tmp_a2.ibd exists with the same space ID.
InnoDB: Cannot rename './benchmarking1/tmp_a2.ibd' to './benchmarking1/em_agg_group_prediction.ibd' for space ID 230 because the target file exists. Remove the target file and try again.
InnoDB:  Cannot replay file rename. Remove either file and try again.
InnoDB: Cannot delete tablespace 229 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 230. Another data file called ./benchmarking1/tmp_a2.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/zem_a3.ibd' with space ID 230. Another data file called ./benchmarking1/tmp_a2.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 231. Another data file called ./benchmarking1/tmp_a3.ibd exists with the same space ID.
InnoDB: Cannot rename './benchmarking1/tmp_a3.ibd' to './benchmarking1/em_agg_group_prediction.ibd' for space ID 231 because the target file exists. Remove the target file and try again.
InnoDB:  Cannot replay file rename. Remove either file and try again.
InnoDB: Cannot delete tablespace 230 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 231. Another data file called ./benchmarking1/tmp_a3.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/zem_a4.ibd' with space ID 231. Another data file called ./benchmarking1/tmp_a3.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 232. Another data file called ./benchmarking1/tmp_a4.ibd exists with the same space ID.
InnoDB: Cannot rename './benchmarking1/tmp_a4.ibd' to './benchmarking1/em_agg_group_prediction.ibd' for space ID 232 because the target file exists. Remove the target file and try again.
InnoDB:  Cannot replay file rename. Remove either file and try again.
InnoDB: Cannot delete tablespace 231 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 232. Another data file called ./benchmarking1/tmp_a4.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/zem_a5.ibd' with space ID 232. Another data file called ./benchmarking1/tmp_a4.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 233. Another data file called ./benchmarking1/tmp_a5.ibd exists with the same space ID.
InnoDB: Cannot rename './benchmarking1/tmp_a5.ibd' to './benchmarking1/em_agg_group_prediction.ibd' for space ID 233 because the target file exists. Remove the target file and try again.
InnoDB:  Cannot replay file rename. Remove either file and try again.
InnoDB: Cannot delete tablespace 232 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 233. Another data file called ./benchmarking1/tmp_a5.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/zem_a6.ibd' with space ID 233. Another data file called ./benchmarking1/tmp_a5.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 234. Another data file called ./benchmarking1/tmp_a6.ibd exists with the same space ID.
InnoDB: Cannot rename './benchmarking1/tmp_a6.ibd' to './benchmarking1/em_agg_group_prediction.ibd' for space ID 234 because the target file exists. Remove the target file and try again.
InnoDB:  Cannot replay file rename. Remove either file and try again.
InnoDB: Cannot delete tablespace 233 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 234. Another data file called ./benchmarking1/tmp_a6.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/zem_a7.ibd' with space ID 234. Another data file called ./benchmarking1/tmp_a6.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 235. Another data file called ./benchmarking1/tmp_a7.ibd exists with the same space ID.
InnoDB: Cannot rename './benchmarking1/tmp_a7.ibd' to './benchmarking1/em_agg_group_prediction.ibd' for space ID 235 because the target file exists. Remove the target file and try again.
InnoDB:  Cannot replay file rename. Remove either file and try again.
InnoDB: Cannot delete tablespace 234 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/tmp_a8.ibd' with space ID 236. Another data file called ./benchmarking1/em_agg_group_prediction.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 235. Another data file called ./benchmarking1/tmp_a7.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/zem_a8.ibd' with space ID 235. Another data file called ./benchmarking1/tmp_a7.ibd exists with the same space ID.
InnoDB: Cannot delete tablespace 235 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/zem_a9.ibd' with space ID 236. Another data file called ./benchmarking1/em_agg_group_prediction.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 237. Another data file called ./benchmarking1/tmp_a9.ibd exists with the same space ID.
InnoDB: Cannot delete tablespace 236 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/zem_a10.ibd' with space ID 237. Another data file called ./benchmarking1/em_agg_group_prediction.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 238. Another data file called ./benchmarking1/tmp_a10.ibd exists with the same space ID.
InnoDB: Cannot delete tablespace 237 because it is not found in the tablespace memory cache.
InnoDB: Ignoring data file './benchmarking1/zem_a11.ibd' with space ID 238. Another data file called ./benchmarking1/em_agg_group_prediction.ibd exists with the same space ID.
InnoDB: Ignoring data file './benchmarking1/em_agg_group_prediction.ibd' with space ID 239. Another data file called ./benchmarking1/tmp_a11.ibd exists with the same space ID.
InnoDB: Doing recovery: scanned up to log sequence number 545788695 (4%)
InnoDB: Cannot delete tablespace 238 because it is not found in the tablespace memory cache.
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
InnoDB: Creating shared tablespace for temporary tables
InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
InnoDB: File './ibtmp1' size is now 12 MB.
InnoDB: 96 redo rollback segment(s) found. 1 redo rollback segment(s) are active.
InnoDB: 32 non-redo rollback segment(s) are active.
InnoDB: 5.7.19 started; log sequence number 545788695
 
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 545791816
InnoDB: Number of pools: 1
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = .
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
InnoDB: PUNCH HOLE support available
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
InnoDB: Compressed tables use zlib 1.2.7
InnoDB: Number of pools: 1
InnoDB: Using CPU crc32 instructions
InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M
InnoDB: Completed initialization of buffer pool
InnoDB: page_cleaner coordinator priority: -20
InnoDB: Setting log file ./ib_logfile101 size to 48 MB
InnoDB: Setting log file ./ib_logfile1 size to 48 MB
InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
InnoDB: New log files created, LSN=545791816
InnoDB: Highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 545792012
InnoDB: Doing recovery: scanned up to log sequence number 545792021 (0%)
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Removed temporary tablespace data file: "ibtmp1"
InnoDB: Creating shared tablespace for temporary tables
InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
InnoDB: File './ibtmp1' size is now 12 MB.
InnoDB: 96 redo rollback segment(s) found. 1 redo rollback segment(s) are active.
InnoDB: 32 non-redo rollback segment(s) are active.
InnoDB: 5.7.19 started; log sequence number 545792021
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 545792040
180717 20:53:28 completed OK!

Comment by Manjot Singh (Inactive) [ 2018-07-17 ]

Running the test with old_alter_table=1 and mariabackup 10.2.16 we get the exact same output as in the ticket report.

The tmp table is there but "doesn't exist in engine"

Comment by Vladislav Vaintroub [ 2018-08-14 ]

Closing in favor of more general MDEV-16791

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