summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/mariabackup/xbstream.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/mariabackup/xbstream.test
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--mysql-test/suite/mariabackup/xbstream.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/suite/mariabackup/xbstream.test b/mysql-test/suite/mariabackup/xbstream.test
new file mode 100644
index 00000000..212ac598
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xbstream.test
@@ -0,0 +1,24 @@
+--source include/innodb_page_size.inc
+
+CREATE TABLE t(i INT) ENGINE INNODB;
+INSERT INTO t VALUES(1);
+
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+mkdir $targetdir;
+let $streamfile=$MYSQLTEST_VARDIR/tmp/backup.xb;
+
+echo # xtrabackup backup to stream;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --databases-exclude=foobar --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
+echo # xbstream extract;
+--disable_result_log
+exec $XBSTREAM -x -C $targetdir < $streamfile;
+
+echo # xtrabackup prepare;
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+
+-- source include/restart_and_restore.inc
+--enable_result_log
+SELECT * FROM t;
+DROP TABLE t;
+rmdir $targetdir;
+