diff options
Diffstat (limited to 'mysql-test/suite/mariabackup/partial.test')
-rw-r--r-- | mysql-test/suite/mariabackup/partial.test | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mysql-test/suite/mariabackup/partial.test b/mysql-test/suite/mariabackup/partial.test index 559ba155972..53388b1947f 100644 --- a/mysql-test/suite/mariabackup/partial.test +++ b/mysql-test/suite/mariabackup/partial.test @@ -12,7 +12,7 @@ CREATE TABLE t2(i int) ENGINE INNODB; echo # xtrabackup backup; -let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +let targetdir=$MYSQLTEST_VARDIR/tmp/backup; --disable_result_log exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=test.*1" --target-dir=$targetdir; --enable_result_log @@ -25,13 +25,27 @@ EOF write_file $targetdir/test/junk.frm; EOF +let server_cnf=$targetdir/server.cnf; +copy_file $MYSQLTEST_VARDIR/my.cnf $server_cnf; + +# Emulate server config file turnes on binary logs +perl; +my $binlog_path="$ENV{'targetdir'}/mysqld-bin"; +my $config_path=$ENV{'server_cnf'}; +open(my $fd, '>>', "$config_path"); +print $fd "\n[mysqld]\n"; +print $fd "log-bin=$binlog_path\n"; +close $fd; +EOF echo # xtrabackup prepare; --disable_result_log -exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.1 --prepare --export --target-dir=$targetdir; +exec $XTRABACKUP --defaults-file=$server_cnf --defaults-group-suffix=.1 --prepare --export --target-dir=$targetdir; --enable_result_log list_files $targetdir/test *.cfg; +# There must not be binary logs created on --prepare step +list_files $targetdir/ mysqld-bin.*; let $MYSQLD_DATADIR= `select @@datadir`; ALTER TABLE t1 DISCARD TABLESPACE; |