diff options
4 files changed, 26 insertions, 1 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 2ccd59ff13b..e497ba5a972 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2759,7 +2759,7 @@ static bool xtrabackup_copy_logfile(bool last = false) log_mutex_exit(); if (!start_lsn) { - msg(recv_sys->found_corrupt_log + die(recv_sys->found_corrupt_log ? "xtrabackup_copy_logfile() failed: corrupt log." : "xtrabackup_copy_logfile() failed."); return true; @@ -4281,6 +4281,8 @@ fail_before_log_copying_thread_start: if (xtrabackup_copy_logfile()) goto fail_before_log_copying_thread_start; + DBUG_MARIABACKUP_EVENT("before_innodb_log_copy_thread_started",0); + log_copying_stop = os_event_create(0); os_thread_create(log_copying_thread, NULL, &log_copying_thread_id); diff --git a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt new file mode 100644 index 00000000000..7111d384b40 --- /dev/null +++ b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt @@ -0,0 +1 @@ +--loose-innodb-log-file-size=1048576 --loose-innodb-log-files-in-group=2 diff --git a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result new file mode 100644 index 00000000000..29abe038afe --- /dev/null +++ b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result @@ -0,0 +1,2 @@ +CREATE TABLE t(i INT) ENGINE=INNODB; +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test new file mode 100644 index 00000000000..22165ff29be --- /dev/null +++ b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test @@ -0,0 +1,20 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_sequence.inc + +CREATE TABLE t(i INT) ENGINE=INNODB; + +--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup + +# Generate enough redo log records to make at least one loop in log group +--let before_innodb_log_copy_thread_started=INSERT INTO test.t SELECT * from test.seq_1_to_102400 + +--disable_result_log +# mariabackup must exit with error instead of hanging +--error 1 +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; +--enable_result_log + +DROP TABLE t; +--rmdir $targetdir + |