Skip to content

Commit a0631e7

Browse files
committed
MDEV-17149 mariabackup hangs if innodb is not started
Fix exit condition for the log copying thread.
1 parent 67b87e1 commit a0631e7

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

extra/mariabackup/xtrabackup.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2718,7 +2718,7 @@ static os_thread_ret_t log_copying_thread(void*)
27182718

27192719
log_mutex_enter();
27202720
bool completed = metadata_to_lsn
2721-
&& metadata_to_lsn < log_copy_scanned_lsn;
2721+
&& metadata_to_lsn <= log_copy_scanned_lsn;
27222722
log_mutex_exit();
27232723
if (completed) {
27242724
break;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--loose-skip-innodb
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CREATE TABLE t(i int);
2+
INSERT INTO t VALUES(1);
3+
# shutdown server
4+
# remove datadir
5+
# xtrabackup move back
6+
# restart server
7+
SELECT * from t;
8+
i
9+
1
10+
DROP TABLE t;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
2+
CREATE TABLE t(i int);
3+
INSERT INTO t VALUES(1);
4+
--disable_result_log
5+
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
6+
exec $XTRABACKUP --prepare --target-dir=$targetdir;
7+
-- source include/restart_and_restore.inc
8+
--enable_result_log
9+
SELECT * from t;
10+
DROP TABLE t;
11+
12+
rmdir $targetdir;

0 commit comments

Comments
 (0)