Commit a2dd4c14 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

post-fix 1c55b845

remove bunch of  *.rej and *.orig files, checked in by mistake.
parent 86a0b576
CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1);
# xtrabackup backup
NOT FOUND /InnoDB: Allocated tablespace ID/ in backup.log
INSERT INTO t VALUES(2);
# xtrabackup prepare
# shutdown server
# remove datadir
# xtrabackup move back
# restart
SELECT * FROM t;
i
1
DROP TABLE t;
#
# MDEV-27121 mariabackup incompatible with disabled dedicated
# undo log tablespaces
#
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
call mtr.add_suppression("InnoDB: Cannot change innodb_undo_tablespaces=0 because previous shutdown was not with innodb_fast_shutdown=0");
call mtr.add_suppression("Found 1 prepared XA transactions");
CREATE TABLE t(f1 INT NOT NULL)ENGINE=InnoDB;
XA START 'zombie';
INSERT INTO t VALUES(1);
XA END 'zombie';
XA PREPARE 'zombie';
# restart: --innodb_undo_tablespaces=0
# xtrabackup backup
# xtrabackup prepare
# shutdown server
# remove datadir
# xtrabackup move back
# restart: --innodb_undo_tablespaces=0
# Display undo log files from target directory
undo001
undo002
XA COMMIT 'zombie';
DROP TABLE t;
--- mysql-test/suite/mariabackup/full_backup.result
+++ mysql-test/suite/mariabackup/full_backup.result
@@ -17,6 +17,7 @@ DROP TABLE t;
# undo log tablespaces
#
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
+call mtr.add_suppression("InnoDB: Cannot change innodb_undo_tablespaces=0 because previous shutdown was not with innodb_fast_shutdown=0");
# restart: --innodb_undo_tablespaces=0
# xtrabackup backup
# xtrabackup prepare
--source include/innodb_page_size.inc
CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1);
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--let $backup_log=$MYSQLTEST_VARDIR/tmp/backup.log
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir > $backup_log 2>&1;
--enable_result_log
# The following warning must not appear after MDEV-27343 fix
--let SEARCH_PATTERN=InnoDB: Allocated tablespace ID
--let SEARCH_FILE=$backup_log
--source include/search_pattern_in_file.inc
--remove_file $backup_log
INSERT INTO t VALUES(2);
echo # xtrabackup prepare;
--disable_result_log
exec $XTRABACKUP --prepare --target-dir=$targetdir;
-- source include/restart_and_restore.inc
--enable_result_log
SELECT * FROM t;
DROP TABLE t;
rmdir $targetdir;
--echo #
--echo # MDEV-27121 mariabackup incompatible with disabled dedicated
--echo # undo log tablespaces
--echo #
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
call mtr.add_suppression("InnoDB: Cannot change innodb_undo_tablespaces=0 because previous shutdown was not with innodb_fast_shutdown=0");
call mtr.add_suppression("Found 1 prepared XA transactions");
CREATE TABLE t(f1 INT NOT NULL)ENGINE=InnoDB;
XA START 'zombie';
INSERT INTO t VALUES(1);
XA END 'zombie';
XA PREPARE 'zombie';
let $restart_parameters=--innodb_undo_tablespaces=0;
--source include/restart_mysqld.inc
echo # xtrabackup backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
--enable_result_log
echo # xtrabackup prepare;
--disable_result_log
exec $XTRABACKUP --prepare --target-dir=$targetdir;
-- source include/restart_and_restore.inc
--enable_result_log
--echo # Display undo log files from target directory
list_files $targetdir undo*;
XA COMMIT 'zombie';
DROP TABLE t;
rmdir $targetdir;
--- mysql-test/suite/mariabackup/full_backup.test
+++ mysql-test/suite/mariabackup/full_backup.test
@@ -34,6 +34,7 @@ rmdir $targetdir;
--echo # undo log tablespaces
--echo #
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
+call mtr.add_suppression("InnoDB: Cannot change innodb_undo_tablespaces=0 because previous shutdown was not with innodb_fast_shutdown=0");
let $restart_parameters=--innodb_undo_tablespaces=0;
--source include/restart_mysqld.inc
--source include/not_embedded.inc
--source include/have_file_key_management.inc
--echo #
--echo # MDEV-13416 mariabackup fails with EFAULT "Bad Address"
--echo #
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
let MYSQLD_DATADIR=`select @@datadir`;
let $targetdir_old=$MYSQLTEST_VARDIR/tmp/backup_1;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir_old;
--enable_result_log
--source include/shutdown_mysqld.inc
if ($MTR_COMBINATION_STRICT_CRC32) {
perl;
my $file= "$ENV{MYSQLD_DATADIR}/ibdata1";
open(FILE, "+<", $file) or die "Unable to open $file\n";
binmode FILE;
my $ps= $ENV{INNODB_PAGE_SIZE};
my $page;
die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
substr($page,26,8) = pack("NN", 4096, ~1024);
sysseek(FILE, 0, 0) || die "Unable to rewind $file\n";
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file\n";
$file= "$ENV{MYSQLD_DATADIR}/ib_logfile0";
open(FILE, ">", $file) || die "Unable to truncate $file\n";
close(FILE) || "Unable to close $file\n";
EOF
--let SEARCH_PATTERN= redo log: [0-9.]*[KMGT]iB; LSN=17596481010687\\b
}
if (!$MTR_COMBINATION_STRICT_CRC32) {
perl;
do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl";
my $file= "$ENV{MYSQLD_DATADIR}/ib_logfile0";
open(FILE, ">", $file) or die "Unable to open $file\n";
binmode FILE;
my $extra_repeat = 139820;
# The desired log sequence number is 17596481011216 (0x1000fffffe10).
my $file_size=4<<20;
my $lsn_hi=4096,$lsn_lo=0xfffffe00 - $extra_repeat * 15;
my $polynomial = 0x82f63b78; # CRC-32C
my ($header, $checkpoint, $log);
$header = "Phys" . pack("x[4]NN", $lsn_hi, $lsn_lo - $file_size + 0x300f) .
"some Perl code" . pack("x[478]");
$header .= pack("Nx[3584]", mycrc32($header, 0, $polynomial));
$checkpoint = pack("NNNNx[44]", $lsn_hi, $lsn_lo, $lsn_hi, $lsn_lo);
$checkpoint .= pack("Nx[8128]", mycrc32($checkpoint, 0, $polynomial));
$log = pack("CxxNN", 0xfa, $lsn_hi, $lsn_lo);
$log .= pack("CN", 0, mycrc32($log, 0, $polynomial));
# Write more than 2MiB of FILE_MODIFY mini-transactions to exercise the parser.
my $extra = pack("CCxa*", 0xb9, 127, "a/b.ibd");
$extra .= pack("CN", 0, mycrc32($extra, 0, $polynomial));
print FILE $header, $checkpoint, $extra x ($extra_repeat - 1), $log;
seek(FILE, $file_size - 15, 0);
$extra = pack("CCxa*", 0xb9, 127, "c/d.ibd");
$extra .= pack("CN", 1, mycrc32($extra, 0, $polynomial));
print FILE $extra;
close(FILE) or die "Unable to close $file\n";
EOF
--let SEARCH_PATTERN= InnoDB: log sequence number 17596481011216
--let $restart_parameters=--innodb-log-file-size=4M --innodb-encrypt-log=0
}
--source include/start_mysqld.inc
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/search_pattern_in_file.inc
CREATE TABLE t(i INT) ENGINE=INNODB ENCRYPTED=YES;
INSERT INTO t VALUES(1);
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
--enable_result_log
SET GLOBAL innodb_flush_log_at_trx_commit=1;
INSERT INTO t VALUES(2);
echo # xtrabackup prepare;
--disable_result_log
exec $XTRABACKUP --prepare --target-dir=$targetdir;
--let $restart_parameters=
--source include/restart_and_restore.inc
--enable_result_log
SELECT * FROM t;
FLUSH TABLE t FOR EXPORT;
copy_file $_datadir/test/t.ibd $_datadir/test/t_copy.ibd;
copy_file $_datadir/test/t.cfg $_datadir/test/t_copy.cfg;
UNLOCK TABLES;
ALTER TABLE t DISCARD TABLESPACE;
move_file $_datadir/test/t_copy.ibd $_datadir/test/t.ibd;
move_file $_datadir/test/t_copy.cfg $_datadir/test/t.cfg;
ALTER TABLE t IMPORT TABLESPACE;
FLUSH TABLE t FOR EXPORT;
copy_file $_datadir/test/t.ibd $_datadir/test/t_copy.ibd;
copy_file $_datadir/test/t.cfg $_datadir/test/t_copy.cfg;
UNLOCK TABLES;
ALTER TABLE t DISCARD TABLESPACE;
move_file $_datadir/test/t_copy.ibd $_datadir/test/t.ibd;
move_file $_datadir/test/t_copy.cfg $_datadir/test/t.cfg;
ALTER TABLE t IMPORT TABLESPACE;
DROP TABLE t;
rmdir $targetdir;
let $targetdir= $targetdir_old;
exec $XTRABACKUP --prepare --target-dir=$targetdir;
--source include/restart_and_restore.inc
rmdir $targetdir_old;
--source include/innodb_undo_tablespaces.inc
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
CREATE TABLE t(i int);
INSERT INTO t VALUES(1);
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
exec $XTRABACKUP --prepare --target-dir=$targetdir;
-- source include/restart_and_restore.inc
--enable_result_log
SELECT * from t;
DROP TABLE t;
rmdir $targetdir;
--- mysql-test/suite/mariabackup/skip_innodb.test
+++ mysql-test/suite/mariabackup/skip_innodb.test
@@ -1,12 +1,13 @@
+--source include/innodb_undo_tablespaces.inc
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
CREATE TABLE t(i int);
INSERT INTO t VALUES(1);
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
exec $XTRABACKUP --prepare --target-dir=$targetdir;
-- source include/restart_and_restore.inc
--enable_result_log
SELECT * from t;
DROP TABLE t;
-rmdir $targetdir;+rmdir $targetdir;
set global innodb_fast_shutdown=0;
# restart: --innodb_undo_tablespaces=2
CREATE TABLE t1(a varchar(60)) ENGINE INNODB;
start transaction;
INSERT INTO t1 VALUES(1);
# xtrabackup backup
# Restart the server with 4 undo tablespaces
set global innodb_fast_shutdown=0;
# restart: --innodb_undo_tablespaces=4
# incremental backup should fail
FOUND 1 /--incremental backup is impossible if the server had been restarted with different innodb_undo_tablespaces/ in backup.log
# Take full backup again
# Prepare full backup
# Display 4 undo log files from target directory
undo001
undo002
undo003
undo004
DROP TABLE t1;
--- mysql-test/suite/mariabackup/undo_upgrade.result
+++ mysql-test/suite/mariabackup/undo_upgrade.result
@@ -0,0 +1,19 @@
+set global innodb_fast_shutdown=0;
+# restart: --innodb_undo_tablespaces=2
+CREATE TABLE t1(a varchar(60)) ENGINE INNODB;
+start transaction;
+INSERT INTO t1 VALUES(1);
+# xtrabackup backup
+# Restart the server with 4 undo tablespaces
+set global innodb_fast_shutdown=0;
+# restart: --innodb_undo_tablespaces=4
+# incremental backup should fail
+FOUND 1 /--incremental backup is impossible if the server had been restarted with different innodb_undo_tablespaces./ in backup.log
+# Take full backup again
+# Prepare full backup
+# Display 4 undo log files from target directory
+undo001
+undo002
+undo003
+undo004
+DROP TABLE t1;
--source include/have_innodb.inc
--source include/innodb_page_size.inc
let basedir=$MYSQLTEST_VARDIR/tmp/backup;
let incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
set global innodb_fast_shutdown=0;
let $restart_parameters=--innodb_undo_tablespaces=2;
--source include/restart_mysqld.inc
CREATE TABLE t1(a varchar(60)) ENGINE INNODB;
start transaction;
INSERT INTO t1 VALUES(1);
--echo # xtrabackup backup
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
--enable_result_log
--echo # Restart the server with 4 undo tablespaces
let $restart_parameters=--innodb_undo_tablespaces=4;
set global innodb_fast_shutdown=0;
--source include/restart_mysqld.inc
let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
--echo # incremental backup should fail
--error 1
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir 2> $backuplog;
--let SEARCH_PATTERN=--incremental backup is impossible if the server had been restarted with different innodb_undo_tablespaces
--let SEARCH_FILE=$backuplog
--source include/search_pattern_in_file.inc
remove_file $backuplog;
rmdir $incremental_dir;
rmdir $basedir;
--echo # Take full backup again
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
--enable_result_log
--disable_result_log
echo # Prepare full backup;
exec $XTRABACKUP --prepare --target-dir=$basedir;
--echo # Display 4 undo log files from target directory
list_files $basedir undo*;
DROP TABLE t1;
rmdir $basedir;
--- mysql-test/suite/mariabackup/undo_upgrade.test
+++ mysql-test/suite/mariabackup/undo_upgrade.test
@@ -0,0 +1,50 @@
+--source include/have_innodb.inc
+--source include/innodb_page_size.inc
+
+let basedir=$MYSQLTEST_VARDIR/tmp/backup;
+let incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
+
+set global innodb_fast_shutdown=0;
+let $restart_parameters=--innodb_undo_tablespaces=2;
+--source include/restart_mysqld.inc
+
+CREATE TABLE t1(a varchar(60)) ENGINE INNODB;
+start transaction;
+INSERT INTO t1 VALUES(1);
+
+--echo # xtrabackup backup
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+--enable_result_log
+
+--echo # Restart the server with 4 undo tablespaces
+let $restart_parameters=--innodb_undo_tablespaces=4;
+set global innodb_fast_shutdown=0;
+--source include/restart_mysqld.inc
+
+let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
+--echo # incremental backup should fail
+--error 1
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir 2> $backuplog;
+
+--let SEARCH_PATTERN=--incremental backup is impossible if the server had been restarted with different innodb_undo_tablespaces.
+--let SEARCH_FILE=$backuplog
+--source include/search_pattern_in_file.inc
+remove_file $backuplog;
+rmdir $incremental_dir;
+rmdir $basedir;
+
+--echo # Take full backup again
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+--enable_result_log
+--disable_result_log
+
+echo # Prepare full backup;
+exec $XTRABACKUP --prepare --target-dir=$basedir;
+
+--echo # Display 4 undo log files from target directory
+list_files $basedir undo*;
+
+DROP TABLE t1;
+rmdir $basedir;
call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200))
ENGINE=InnoDB PAGE_COMPRESSED=YES STATS_PERSISTENT=0;
insert into t1(b, c) values("mariadb", "mariabackup");
InnoDB 0 transactions not purged
# Corrupt the table
# restart: --skip-innodb-buffer-pool-load-at-startup
# xtrabackup backup
FOUND 1 /Database page corruption detected.*/ in backup.log
drop table t1;
--- mysql-test/suite/mariabackup/unencrypted_page_compressed.result
+++ mysql-test/suite/mariabackup/unencrypted_page_compressed.result
@@ -1,4 +1,5 @@
call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
+SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes;
insert into t1(b, c) values("mariadb", "mariabackup");
InnoDB 0 transactions not purged
call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200))
ENGINE=InnoDB PAGE_COMPRESSED=YES STATS_PERSISTENT=0;
insert into t1(b, c) values("mariadb", "mariabackup");
--source ../innodb/include/wait_all_purged.inc
let $MYSQLD_DATADIR=`select @@datadir`;
let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
--source include/shutdown_mysqld.inc
--echo # Corrupt the table
perl;
use strict;
use warnings;
use Fcntl qw(:DEFAULT :seek);
my $ibd_file = $ENV{'t1_IBD'};
my $chunk;
my $page_size = $ENV{'INNODB_PAGE_SIZE'};
sysopen IBD_FILE, $ibd_file, O_RDWR || die "Unable to open $ibd_file";
sysseek IBD_FILE, 16384 * 3 + 75, SEEK_CUR;
$chunk = '\xAA\xAA\xAA\xAA';
syswrite IBD_FILE, $chunk, 4;
close IBD_FILE;
EOF
--let $restart_parameters= --skip-innodb-buffer-pool-load-at-startup
--source include/start_mysqld.inc
echo # xtrabackup backup;
--disable_result_log
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
--error 1
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --core-file > $backuplog;
--enable_result_log
--let SEARCH_PATTERN=Database page corruption detected.*
--let SEARCH_FILE=$backuplog
--source include/search_pattern_in_file.inc
remove_file $backuplog;
drop table t1;
rmdir $targetdir;
--- mysql-test/suite/mariabackup/unencrypted_page_compressed.test
+++ mysql-test/suite/mariabackup/unencrypted_page_compressed.test
@@ -1,4 +1,5 @@
call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
+SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes;
insert into t1(b, c) values("mariadb", "mariabackup");
--source ../innodb/include/wait_all_purged.inc
#--source include/innodb_page_size.inc
--source include/have_file_key_management.inc
CREATE TABLE t(c TEXT) ENGINE INNODB encrypted=yes;
INSERT INTO t VALUES(REPEAT('fubar',100));
INSERT INTO t VALUES('foobar1');
DELETE FROM t LIMIT 1;
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
--enable_result_log
--let SEARCH_RANGE = 10000000
--let SEARCH_PATTERN=foobar1
--let SEARCH_FILE=$targetdir/ib_logfile0
--source include/search_pattern_in_file.inc
--echo # expect NOT FOUND
INSERT INTO t VALUES('foobar2');
echo # xtrabackup prepare;
--disable_result_log
exec $XTRABACKUP --prepare --target-dir=$targetdir;
-- source include/restart_and_restore.inc
--enable_result_log
--list_files $targetdir ib_logfile*
--remove_file $targetdir/ib_logfile0
SELECT * FROM t;
DROP TABLE t;
rmdir $targetdir;
#--source include/innodb_page_size.inc
--disable_warnings
DROP TABLE IF EXISTS mysql.mariadb_backup_history;
--enable_warnings
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --history=foo --backup --target-dir=$targetdir;
--enable_result_log
rmdir $targetdir;
SHOW CREATE TABLE mysql.mariadb_backup_history;
SELECT COUNT(*) FROM mysql.mariadb_backup_history;
SELECT name FROM mysql.mariadb_backup_history;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --history --backup --target-dir=$targetdir;
--enable_result_log
rmdir $targetdir;
SELECT COUNT(*) FROM mysql.mariadb_backup_history;
--sorted_result
SELECT name FROM mysql.mariadb_backup_history;
DROP TABLE mysql.mariadb_backup_history;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment