summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2022-11-07 17:36:08 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2022-11-07 17:36:08 +0530
commitf7e6198c0221112fdeb42668f89d29c828636156 (patch)
tree39f29505559c668f8427a24f60782192cc3be3ce
parent92be8d20480ee0e2fb8ec72c005648f2573558ce (diff)
downloadmariadb-git-f7e6198c0221112fdeb42668f89d29c828636156.tar.gz
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
-rw-r--r--extra/mariabackup/xtrabackup.cc4
-rw-r--r--mysql-test/suite/mariabackup/full_backup.opt1
-rw-r--r--mysql-test/suite/mariabackup/full_backup.result14
-rw-r--r--mysql-test/suite/mariabackup/full_backup.test24
4 files changed, 39 insertions, 4 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 2b276856303..f7910fc9c23 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -3578,10 +3578,6 @@ static dberr_t xb_assign_undo_space_start()
ulint space;
int n_retries = 5;
- if (srv_undo_tablespaces == 0) {
- return error;
- }
-
file = os_file_create(0, srv_sys_space.first_datafile()->filepath(),
OS_FILE_OPEN, OS_FILE_NORMAL, OS_DATA_FILE, true, &ret);
diff --git a/mysql-test/suite/mariabackup/full_backup.opt b/mysql-test/suite/mariabackup/full_backup.opt
new file mode 100644
index 00000000000..7928cd812d0
--- /dev/null
+++ b/mysql-test/suite/mariabackup/full_backup.opt
@@ -0,0 +1 @@
+--innodb_undo_tablespaces=2
diff --git a/mysql-test/suite/mariabackup/full_backup.result b/mysql-test/suite/mariabackup/full_backup.result
index 954151bbad7..10f4dc44ed4 100644
--- a/mysql-test/suite/mariabackup/full_backup.result
+++ b/mysql-test/suite/mariabackup/full_backup.result
@@ -12,3 +12,17 @@ SELECT * FROM t;
i
1
DROP TABLE t;
+#
+# MDEV-27121 mariabackup incompatible with disabled dedicated
+# undo log tablespaces
+#
+call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
+# xtrabackup backup
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+# Display undo log files from target directory
+undo001
+undo002
diff --git a/mysql-test/suite/mariabackup/full_backup.test b/mysql-test/suite/mariabackup/full_backup.test
index 66bed34cf3d..a0243527438 100644
--- a/mysql-test/suite/mariabackup/full_backup.test
+++ b/mysql-test/suite/mariabackup/full_backup.test
@@ -29,3 +29,27 @@ SELECT * FROM t;
DROP TABLE t;
rmdir $targetdir;
+--echo #
+--echo # MDEV-27121 mariabackup incompatible with disabled dedicated
+--echo # undo log tablespaces
+--echo #
+call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
+
+let $restart_parameters=--innodb_undo_tablespaces=0;
+--source include/restart_mysqld.inc
+
+echo # xtrabackup backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+--enable_result_log
+
+echo # xtrabackup prepare;
+--disable_result_log
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+-- source include/restart_and_restore.inc
+--enable_result_log
+
+--echo # Display undo log files from target directory
+list_files $targetdir undo*;
+
+rmdir $targetdir;