summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2023-02-03 07:42:59 +0400
committerSergei Golubchik <serg@mariadb.org>2023-03-10 12:41:58 +0100
commitb314f7b6420069a01d64b33fa461f0914feb8638 (patch)
tree967d2ad254301d86c8676e4511ba24b75a025a3d /mysql-test/suite
parent4ae97333f08b58d1934e0c7804732e7ad2eca39b (diff)
downloadmariadb-git-b314f7b6420069a01d64b33fa461f0914feb8638.tar.gz
MDEV-18931 Rename Mariabackup's xtrabackup_* files to mariadb_backup_*
Renaming the default MariaDB backup directory from xtrabackup_backupfiles to mariadb_backup_files. Renaming files: - xtrabackup_binlog_info to mariadb_backup_binlog_info - xtrabackup_checkpoints to mariadb_backup_checkpoints - xtrabackup_galera_info to mariadb_backup_galera_info - xtrabackup_info to mariadb_backup_info - xtrabackup_slave_info to mariadb_backup_slave_info
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/mariabackup/compat_xtrabackup.result21
-rw-r--r--mysql-test/suite/mariabackup/compat_xtrabackup.test62
-rw-r--r--mysql-test/suite/mariabackup/extra_lsndir.result4
-rw-r--r--mysql-test/suite/mariabackup/extra_lsndir_stream.result4
-rw-r--r--mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc4
-rw-r--r--mysql-test/suite/mariabackup/rpl_slave_info.result12
-rw-r--r--mysql-test/suite/mariabackup/rpl_slave_info.test6
-rw-r--r--mysql-test/suite/mariabackup/slave_info_norpl.result2
-rw-r--r--mysql-test/suite/mariabackup/slave_info_norpl.test4
9 files changed, 101 insertions, 18 deletions
diff --git a/mysql-test/suite/mariabackup/compat_xtrabackup.result b/mysql-test/suite/mariabackup/compat_xtrabackup.result
new file mode 100644
index 00000000000..484dc0d7d46
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compat_xtrabackup.result
@@ -0,0 +1,21 @@
+call mtr.add_suppression("InnoDB: New log files created");
+#
+# Start of 10.11 tests
+#
+#
+# MDEV-18931 Rename Mariabackup's xtrabackup_* files to mariadb_backup_*
+#
+CREATE TABLE t1(i INT PRIMARY KEY) ENGINE MYISAM;
+INSERT INTO t1 VALUES (1);
+# Prepare full backup, apply incremental one
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+SELECT * FROM test.t1;
+i
+1
+DROP TABLE t1;
+#
+# End of 10.11 tests
+#
diff --git a/mysql-test/suite/mariabackup/compat_xtrabackup.test b/mysql-test/suite/mariabackup/compat_xtrabackup.test
new file mode 100644
index 00000000000..67d043fd436
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compat_xtrabackup.test
@@ -0,0 +1,62 @@
+call mtr.add_suppression("InnoDB: New log files created");
+
+--echo #
+--echo # Start of 10.11 tests
+--echo #
+
+--echo #
+--echo # MDEV-18931 Rename Mariabackup's xtrabackup_* files to mariadb_backup_*
+--echo #
+
+--let $basedir=$MYSQLTEST_VARDIR/tmp/backup
+--let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1
+
+CREATE TABLE t1(i INT PRIMARY KEY) ENGINE MYISAM;
+INSERT INTO t1 VALUES (1);
+
+--disable_result_log
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir
+--enable_result_log
+
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir
+
+#
+# Emulate a backup created by an older version:
+# Rename mariadb_backup_checkpoints
+#
+
+--move_file $basedir/mariadb_backup_checkpoints $basedir/xtrabackup_checkpoints
+--move_file $incremental_dir/mariadb_backup_checkpoints $incremental_dir/xtrabackup_checkpoints
+
+#
+# Emulate a backup created by an older version:
+# Rename mariadb_backup_info
+# Note, mariadb_backup_info is not currently used during --prepare or --restore
+# But it's still good to rename it:
+# - we can start using it during --prepare or --restore
+# - to provide full emulation
+#
+
+--move_file $basedir/mariadb_backup_info $basedir/mariadb_backup_info
+--move_file $incremental_dir/mariadb_backup_info $incremental_dir/mariadb_backup_info
+
+
+--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
+--enable_result_log
+
+--let $targetdir=$basedir
+--source include/restart_and_restore.inc
+--enable_result_log
+
+SELECT * FROM test.t1;
+
+DROP TABLE t1;
+--rmdir $basedir
+--rmdir $incremental_dir
+
+--echo #
+--echo # End of 10.11 tests
+--echo #
diff --git a/mysql-test/suite/mariabackup/extra_lsndir.result b/mysql-test/suite/mariabackup/extra_lsndir.result
index a25c45a13d1..58e395eb65e 100644
--- a/mysql-test/suite/mariabackup/extra_lsndir.result
+++ b/mysql-test/suite/mariabackup/extra_lsndir.result
@@ -1,2 +1,2 @@
-xtrabackup_checkpoints
-xtrabackup_info
+mariadb_backup_checkpoints
+mariadb_backup_info
diff --git a/mysql-test/suite/mariabackup/extra_lsndir_stream.result b/mysql-test/suite/mariabackup/extra_lsndir_stream.result
index a25c45a13d1..58e395eb65e 100644
--- a/mysql-test/suite/mariabackup/extra_lsndir_stream.result
+++ b/mysql-test/suite/mariabackup/extra_lsndir_stream.result
@@ -1,2 +1,2 @@
-xtrabackup_checkpoints
-xtrabackup_info
+mariadb_backup_checkpoints
+mariadb_backup_info
diff --git a/mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc b/mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc
index 4a83c9c394e..ba0116a81cf 100644
--- a/mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc
+++ b/mysql-test/suite/mariabackup/include/show_xtrabackup_slave_info.inc
@@ -1,8 +1,8 @@
--disable_query_log
---file_exists $targetdir/xtrabackup_slave_info
+--file_exists $targetdir/mariadb_backup_slave_info
CREATE TEMPORARY TABLE tmp_slave_info(lineno SERIAL, line TEXT);
--replace_result $targetdir TARGETDIR
---eval LOAD DATA LOCAL INFILE '$targetdir/xtrabackup_slave_info' INTO TABLE tmp_slave_info (line);
+--eval LOAD DATA LOCAL INFILE '$targetdir/mariadb_backup_slave_info' INTO TABLE tmp_slave_info (line);
SELECT
lineno,
regexp_replace(
diff --git a/mysql-test/suite/mariabackup/rpl_slave_info.result b/mysql-test/suite/mariabackup/rpl_slave_info.result
index ec27166ecfb..2b9b6223401 100644
--- a/mysql-test/suite/mariabackup/rpl_slave_info.result
+++ b/mysql-test/suite/mariabackup/rpl_slave_info.result
@@ -11,8 +11,8 @@ connection master;
CREATE TABLE t(i INT);
connection slave;
"using_gtid: Slave_Pos"
-FOUND 1 /gtid_slave_pos/ in xtrabackup_slave_info
-NOT FOUND /MASTER_LOG_FILE/ in xtrabackup_slave_info
+FOUND 1 /gtid_slave_pos/ in mariadb_backup_slave_info
+NOT FOUND /MASTER_LOG_FILE/ in mariadb_backup_slave_info
lineno line
1 SET GLOBAL gtid_slave_pos = '<NUM-NUM-NUM>';
2 CHANGE MASTER TO master_use_gtid = slave_pos;
@@ -21,8 +21,8 @@ lineno line
########################
include/stop_slave.inc
SET GLOBAL gtid_slave_pos="";
-NOT FOUND /gtid_slave_pos/ in xtrabackup_slave_info
-FOUND 1 /MASTER_LOG_FILE/ in xtrabackup_slave_info
+NOT FOUND /gtid_slave_pos/ in mariadb_backup_slave_info
+FOUND 1 /MASTER_LOG_FILE/ in mariadb_backup_slave_info
lineno line
1 CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=<NUM>;
###############
@@ -34,8 +34,8 @@ connection master;
INSERT INTO t VALUES(1);
connection slave;
"using_gtid: No"
-NOT FOUND /gtid_slave_pos/ in xtrabackup_slave_info
-FOUND 1 /MASTER_LOG_FILE/ in xtrabackup_slave_info
+NOT FOUND /gtid_slave_pos/ in mariadb_backup_slave_info
+FOUND 1 /MASTER_LOG_FILE/ in mariadb_backup_slave_info
lineno line
1 CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=<NUM>;
connection master;
diff --git a/mysql-test/suite/mariabackup/rpl_slave_info.test b/mysql-test/suite/mariabackup/rpl_slave_info.test
index 1c5dd89acc9..73ad00f13a0 100644
--- a/mysql-test/suite/mariabackup/rpl_slave_info.test
+++ b/mysql-test/suite/mariabackup/rpl_slave_info.test
@@ -22,7 +22,7 @@ CREATE TABLE t(i INT);
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2 --slave-info --backup --target-dir=$targetdir;
--enable_result_log
---let SEARCH_FILE=$targetdir/xtrabackup_slave_info
+--let SEARCH_FILE=$targetdir/mariadb_backup_slave_info
--let SEARCH_PATTERN=gtid_slave_pos
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=MASTER_LOG_FILE
@@ -45,7 +45,7 @@ SET GLOBAL gtid_slave_pos="";
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2 --slave-info --backup --target-dir=$targetdir;
--enable_result_log
---let SEARCH_FILE=$targetdir/xtrabackup_slave_info
+--let SEARCH_FILE=$targetdir/mariadb_backup_slave_info
--let SEARCH_PATTERN=gtid_slave_pos
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=MASTER_LOG_FILE
@@ -73,7 +73,7 @@ INSERT INTO t VALUES(1);
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2 --slave-info --backup --target-dir=$targetdir;
--enable_result_log
---let SEARCH_FILE=$targetdir/xtrabackup_slave_info
+--let SEARCH_FILE=$targetdir/mariadb_backup_slave_info
--let SEARCH_PATTERN=gtid_slave_pos
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=MASTER_LOG_FILE
diff --git a/mysql-test/suite/mariabackup/slave_info_norpl.result b/mysql-test/suite/mariabackup/slave_info_norpl.result
index 04ca2fb2242..18cda94065b 100644
--- a/mysql-test/suite/mariabackup/slave_info_norpl.result
+++ b/mysql-test/suite/mariabackup/slave_info_norpl.result
@@ -8,7 +8,7 @@ SELECT @@global.gtid_slave_pos;
@@global.gtid_slave_pos
-# Without any masters the file xtrabackup_slave_info is not created
+# Without any masters the file mariadb_backup_slave_info is not created
line
[00] YYYY-MM-DD hh:mm:ss Failed to get master binlog coordinates from SHOW SLAVE STATUS.This means that the server is not a replication slave. Ignoring the --slave-info option
diff --git a/mysql-test/suite/mariabackup/slave_info_norpl.test b/mysql-test/suite/mariabackup/slave_info_norpl.test
index 0d2d2ed4861..298aaa2dda5 100644
--- a/mysql-test/suite/mariabackup/slave_info_norpl.test
+++ b/mysql-test/suite/mariabackup/slave_info_norpl.test
@@ -19,13 +19,13 @@
SELECT @@global.gtid_slave_pos;
--echo
---echo # Without any masters the file xtrabackup_slave_info is not created
+--echo # Without any masters the file mariadb_backup_slave_info is not created
--disable_result_log
exec $XTRABACKUP $XTRABACKUP_ARGS >$XTRABACKUP_OUT;
--enable_result_log
--error 1
---file_exists $targetdir/xtrabackup_slave_info
+--file_exists $targetdir/mariadb_backup_slave_info
--source include/show_xtrabackup_slave_info_out.inc
--remove_file $XTRABACKUP_OUT
rmdir $targetdir;