[MDEV-12988] backup fails if innodb_undo_tablespaces>0 Created: 2017-06-03 Updated: 2021-11-24 Resolved: 2017-08-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup |
| Affects Version/s: | 10.1.24 |
| Fix Version/s: | 10.1.27, 10.2.9, 10.3.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Michael Xu | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7.x x86_64 |
||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
Also, there is a warning, ignoring innodb_flush_method = O_DIRECT on Windows, but the server is running on Linux. |
| Comments |
| Comment by Vladislav Vaintroub [ 2017-06-13 ] | |||||||||||||||||||||||||||||||||||||
|
Please share your my.cnf file please. | |||||||||||||||||||||||||||||||||||||
| Comment by Andrii Nikitin (Inactive) [ 2017-06-14 ] | |||||||||||||||||||||||||||||||||||||
|
I can repeat the problem with 10.1.24 and latest 10.1 build by calling mysql_install_db with innodb_undo_tablespaces=4 .
my.cnf
10.1.23 doesn't seem to be affected. | |||||||||||||||||||||||||||||||||||||
| Comment by Andrii Nikitin (Inactive) [ 2017-07-13 ] | |||||||||||||||||||||||||||||||||||||
|
10.2.7 shows little different assert
| |||||||||||||||||||||||||||||||||||||
| Comment by Michael Xu [ 2017-07-14 ] | |||||||||||||||||||||||||||||||||||||
|
my.cnf attached, and I think the error may caused by undo_tablespaces setting
| |||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-08-10 ] | |||||||||||||||||||||||||||||||||||||
|
MariaDB 10.1.24 was the first one to contain the merge from MySQL 5.6.36, which introduced | |||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-08-17 ] | |||||||||||||||||||||||||||||||||||||
|
I can trivially repeat with
on both 10.1 and 10.2. | |||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-08-17 ] | |||||||||||||||||||||||||||||||||||||
|
The problem is that in backup mode, srv_undo_tablespaces_init() will not initialize the undo_tablespace_ids[]. In normal startup, trx_rseg_get_n_undo_tablespaces() would take care of it. During backup, we do not have a buffer pool, and we cannot access the TRX_SYS page directly in the system tablespace, because the file page could be stale (some changes for it could be in the redo log only). Because backup does not really parse individual redo log records, and because we need to discover all tablespaces (including the undo tablespaces) at the start of the backup, some other mechanism is needed. As of today, Percona Xtrabackup 2.3 is still based on MySQL 5.6.14, so it is missing any adjustment for the MySQL 5.6.36 change Mariabackup should read the first page of the undo001 file and determine the tablespace ID from there. Perhaps it could simply treat all the undo* files in the same way as *.ibd files. | |||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-08-17 ] | |||||||||||||||||||||||||||||||||||||
|
To reduce the scope of this fix, I filed a separate bug for the 5.6.36 incompatibility: |