mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 17:54:16 +01:00
MDEV-30114 Incremental prepare fails when innodb_undo_tablespaces > 0
- Mariabackup fails to open the undo tablespaces while applying delta files to the corresponding data file. Mariabackup opens the undo tablespaces first time in srv_undo_tablespaces_init() and does tries to open the undo tablespaces in xtrabackup_apply_deltas() with conflicting mode and leads to the failure. - Mariabackup should close the undo tablespaces before applying the incremental delta files.
This commit is contained in:
parent
7487c313bc
commit
dd20a43c6c
11 changed files with 30 additions and 0 deletions
|
@ -3799,6 +3799,21 @@ func_exit:
|
|||
return error;
|
||||
}
|
||||
|
||||
/** Close all undo tablespaces while applying incremental delta */
|
||||
static void xb_close_undo_tablespaces()
|
||||
{
|
||||
if (srv_undo_space_id_start == 0)
|
||||
return;
|
||||
for (ulint space_id= srv_undo_space_id_start;
|
||||
space_id < srv_undo_space_id_start + srv_undo_tablespaces_open;
|
||||
space_id++)
|
||||
{
|
||||
fil_space_t *space= fil_space_get(space_id);
|
||||
ut_ad(space);
|
||||
space->close();
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Populates the tablespace memory cache by scanning for and opening data files.
|
||||
@returns DB_SUCCESS or error code.*/
|
||||
|
@ -3861,6 +3876,11 @@ xb_load_tablespaces()
|
|||
if (err != DB_SUCCESS) {
|
||||
return(err);
|
||||
}
|
||||
|
||||
if (srv_operation == SRV_OPERATION_RESTORE_DELTA) {
|
||||
xb_close_undo_tablespaces();
|
||||
}
|
||||
|
||||
DBUG_MARIABACKUP_EVENT("after_load_tablespaces", 0);
|
||||
return(DB_SUCCESS);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: New log files created");
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
--source include/have_aria.inc
|
||||
--source include/innodb_page_size.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
|
||||
# see suite.pm "check for exact values, in case the default changes to be small everywhere"
|
||||
if (`select @@max_binlog_stmt_cache_size = 4294963200 and @@innodb_page_size = 65536`) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/have_partition.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
|
||||
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
|
||||
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
--source include/have_debug.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: New log files created");
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
--source include/have_debug.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: New log files created");
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
--source include/innodb_page_size.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
|
||||
if (!$EXAMPLE_KEY_MANAGEMENT_SO)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: New log files created");
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
--source include/have_debug.inc
|
||||
--source include/no_valgrind_without_big.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
|
||||
--echo ########
|
||||
--echo # Test for generating "innodb_corrupted_pages" file during full and
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
call mtr.add_suppression("InnoDB: New log files created");
|
||||
call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation");
|
||||
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified");
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#--source include/innodb_page_size.inc
|
||||
--source include/have_partition.inc
|
||||
--source include/innodb_undo_tablespaces.inc
|
||||
|
||||
CREATE TABLE t1(a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
|
|
Loading…
Add table
Reference in a new issue