Skip to content

Commit f7e6198

Browse files
MDEV-27121 mariabackup incompatible with disabled dedicated undo log tablespaces
- mariabackup fails to assign srv_undo_space_id_start when the dedicated undo tablespaces are disabled
1 parent 92be8d2 commit f7e6198

File tree

4 files changed

+39
-4
lines changed

4 files changed

+39
-4
lines changed

extra/mariabackup/xtrabackup.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3578,10 +3578,6 @@ static dberr_t xb_assign_undo_space_start()
35783578
ulint space;
35793579
int n_retries = 5;
35803580

3581-
if (srv_undo_tablespaces == 0) {
3582-
return error;
3583-
}
3584-
35853581
file = os_file_create(0, srv_sys_space.first_datafile()->filepath(),
35863582
OS_FILE_OPEN, OS_FILE_NORMAL, OS_DATA_FILE, true, &ret);
35873583

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--innodb_undo_tablespaces=2

mysql-test/suite/mariabackup/full_backup.result

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,17 @@ SELECT * FROM t;
1212
i
1313
1
1414
DROP TABLE t;
15+
#
16+
# MDEV-27121 mariabackup incompatible with disabled dedicated
17+
# undo log tablespaces
18+
#
19+
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
20+
# xtrabackup backup
21+
# xtrabackup prepare
22+
# shutdown server
23+
# remove datadir
24+
# xtrabackup move back
25+
# restart server
26+
# Display undo log files from target directory
27+
undo001
28+
undo002

mysql-test/suite/mariabackup/full_backup.test

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,27 @@ SELECT * FROM t;
2929
DROP TABLE t;
3030
rmdir $targetdir;
3131

32+
--echo #
33+
--echo # MDEV-27121 mariabackup incompatible with disabled dedicated
34+
--echo # undo log tablespaces
35+
--echo #
36+
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
37+
38+
let $restart_parameters=--innodb_undo_tablespaces=0;
39+
--source include/restart_mysqld.inc
40+
41+
echo # xtrabackup backup;
42+
--disable_result_log
43+
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
44+
--enable_result_log
45+
46+
echo # xtrabackup prepare;
47+
--disable_result_log
48+
exec $XTRABACKUP --prepare --target-dir=$targetdir;
49+
-- source include/restart_and_restore.inc
50+
--enable_result_log
51+
52+
--echo # Display undo log files from target directory
53+
list_files $targetdir undo*;
54+
55+
rmdir $targetdir;

0 commit comments

Comments
 (0)