Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Won't Fix
-
10.1, 10.2, 10.3
-
10.2.12
Description
Currently mariabackup 10.2 doesn't complain when user attempts to apply incremental backup to incorrect base backup, (probably corrupting data).
10.1 does verify to_lsn and from_lsn in xtrabackup_checkpoints file, while 10.2 seems to ignore that.
Test below succeeds in 10.1 (meaning that mariabackup correctly shows error), while fails in 10.2
call mtr.add_suppression("InnoDB: New log files created"); |
|
let $fullbackup_old=$MYSQLTEST_VARDIR/tmp/backup_old;
|
let $fullbackup_new=$MYSQLTEST_VARDIR/tmp/backup_new;
|
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
|
|
CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB; |
INSERT INTO t VALUES(1); |
|
echo # Create full backup then incremental; |
--disable_result_log
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$fullbackup_old; |
INSERT INTO t VALUES(2); |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$fullbackup_old; |
|
INSERT INTO t VALUES(3); |
|
echo # Create and prepare new backup; |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$fullbackup_new; |
exec $XTRABACKUP --prepare --apply-log-only --target-dir=$fullbackup_new; |
|
echo # try to apply old incremental to wrong full; |
--error 1
|
exec $XTRABACKUP --prepare --target-dir=$fullbackup_new --incremental-dir=$incremental_dir ; |
--enable_result_log
|
|
DROP TABLE t; |
|
# Cleanup
|
rmdir $fullbackup_new;
|
rmdir $fullbackup_old;
|
rmdir $incremental_dir;
|