-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-18204 Fix rocksdb incremental backup
Fix incremental prepare to copy #rocksdb subdirectory from the incremental dir.
- Loading branch information
Showing
7 changed files
with
133 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--plugin-load=$HA_ROCKSDB_SO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
call mtr.add_suppression("InnoDB: New log files created"); | ||
CREATE TABLE t(i INT PRIMARY KEY) ENGINE ROCKSDB; | ||
INSERT INTO t VALUES(1); | ||
# Create full backup , modify table, then create incremental/differential backup | ||
DROP TABLE t; | ||
CREATE TABLE t2(i INT PRIMARY KEY) ENGINE ROCKSDB; | ||
INSERT INTO t2 VALUES(2); | ||
# Prepare full backup, apply incremental one | ||
# Restore and check results | ||
# shutdown server | ||
# remove datadir | ||
# xtrabackup move back | ||
# restart server | ||
SELECT * FROM t2; | ||
i | ||
2 | ||
DROP TABLE t2; | ||
DROP TABLE t; | ||
ERROR 42S02: Unknown table 'test.t' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--source include/have_rocksdb.inc | ||
call mtr.add_suppression("InnoDB: New log files created"); | ||
|
||
let $basedir=$MYSQLTEST_VARDIR/tmp/backup; | ||
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; | ||
|
||
CREATE TABLE t(i INT PRIMARY KEY) ENGINE ROCKSDB; | ||
INSERT INTO t VALUES(1); | ||
|
||
echo # Create full backup , modify table, then create incremental/differential backup; | ||
--disable_result_log | ||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; | ||
--enable_result_log | ||
DROP TABLE t; | ||
CREATE TABLE t2(i INT PRIMARY KEY) ENGINE ROCKSDB; | ||
INSERT INTO t2 VALUES(2); | ||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir; | ||
|
||
--disable_result_log | ||
echo # Prepare full backup, apply incremental one; | ||
exec $XTRABACKUP --prepare --target-dir=$basedir; | ||
|
||
exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ; | ||
|
||
echo # Restore and check results; | ||
let $targetdir=$basedir; | ||
-- source include/restart_and_restore.inc | ||
--enable_result_log | ||
|
||
SELECT * FROM t2; | ||
DROP TABLE t2; | ||
--error ER_BAD_TABLE_ERROR | ||
DROP TABLE t; | ||
|
||
# Cleanup | ||
rmdir $basedir; | ||
rmdir $incremental_dir; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters