summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-01-29 13:49:23 +0100
committerSergei Golubchik <serg@mariadb.org>2017-01-29 13:50:30 +0100
commita7d6271cbf63d129045ba4c97333f975bf88e050 (patch)
treedd040ba1d2c3d4fc816f6954d1b7953a1b714400
parentabfcdb8fbc4dec1ef9e6ea8fc9961344186b0209 (diff)
downloadmariadb-git-a7d6271cbf63d129045ba4c97333f975bf88e050.tar.gz
skip innodb.log_corruption test if no unzip executable is found
also move *.zip files from t/ to std_data/
-rw-r--r--mysql-test/include/have_unzip.inc3
-rw-r--r--mysql-test/suite.pm2
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption.zip (renamed from mysql-test/suite/innodb/t/log_corruption.zip)bin94694 -> 94694 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption0.zip (renamed from mysql-test/suite/innodb/t/log_corruption0.zip)bin1211 -> 1211 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption1.zip (renamed from mysql-test/suite/innodb/t/log_corruption1.zip)bin1257 -> 1257 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption2.zip (renamed from mysql-test/suite/innodb/t/log_corruption2.zip)bin1304 -> 1304 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption3.zip (renamed from mysql-test/suite/innodb/t/log_corruption3.zip)bin1304 -> 1304 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption4.zip (renamed from mysql-test/suite/innodb/t/log_corruption4.zip)bin1308 -> 1308 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption4a.zip (renamed from mysql-test/suite/innodb/t/log_corruption4a.zip)bin1310 -> 1310 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption5.zip (renamed from mysql-test/suite/innodb/t/log_corruption5.zip)bin1308 -> 1308 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption6.zip (renamed from mysql-test/suite/innodb/t/log_corruption6.zip)bin1311 -> 1311 bytes
-rw-r--r--mysql-test/suite/innodb/t/log_corruption.test19
12 files changed, 15 insertions, 9 deletions
diff --git a/mysql-test/include/have_unzip.inc b/mysql-test/include/have_unzip.inc
new file mode 100644
index 00000000000..a3308524679
--- /dev/null
+++ b/mysql-test/include/have_unzip.inc
@@ -0,0 +1,3 @@
+#
+# empty. the real check happens in suite.pm
+#
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index f501e610e53..134a0d6d438 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -68,6 +68,8 @@ sub skip_combinations {
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
and $1 ge "1.0.1d";
+ $skip{'include/have_unzip.inc'} = 'no unzip executable' unless `unzip`;
+
%skip;
}
diff --git a/mysql-test/suite/innodb/t/log_corruption.zip b/mysql-test/suite/innodb/std_data/log_corruption.zip
index 6f126c2edf0..6f126c2edf0 100644
--- a/mysql-test/suite/innodb/t/log_corruption.zip
+++ b/mysql-test/suite/innodb/std_data/log_corruption.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/log_corruption0.zip b/mysql-test/suite/innodb/std_data/log_corruption0.zip
index c003a18a1b2..c003a18a1b2 100644
--- a/mysql-test/suite/innodb/t/log_corruption0.zip
+++ b/mysql-test/suite/innodb/std_data/log_corruption0.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/log_corruption1.zip b/mysql-test/suite/innodb/std_data/log_corruption1.zip
index 35a02adaa6d..35a02adaa6d 100644
--- a/mysql-test/suite/innodb/t/log_corruption1.zip
+++ b/mysql-test/suite/innodb/std_data/log_corruption1.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/log_corruption2.zip b/mysql-test/suite/innodb/std_data/log_corruption2.zip
index 4e4180ac4a3..4e4180ac4a3 100644
--- a/mysql-test/suite/innodb/t/log_corruption2.zip
+++ b/mysql-test/suite/innodb/std_data/log_corruption2.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/log_corruption3.zip b/mysql-test/suite/innodb/std_data/log_corruption3.zip
index 2337c81a80b..2337c81a80b 100644
--- a/mysql-test/suite/innodb/t/log_corruption3.zip
+++ b/mysql-test/suite/innodb/std_data/log_corruption3.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/log_corruption4.zip b/mysql-test/suite/innodb/std_data/log_corruption4.zip
index 86002d7d42a..86002d7d42a 100644
--- a/mysql-test/suite/innodb/t/log_corruption4.zip
+++ b/mysql-test/suite/innodb/std_data/log_corruption4.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/log_corruption4a.zip b/mysql-test/suite/innodb/std_data/log_corruption4a.zip
index 6d072f3029f..6d072f3029f 100644
--- a/mysql-test/suite/innodb/t/log_corruption4a.zip
+++ b/mysql-test/suite/innodb/std_data/log_corruption4a.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/log_corruption5.zip b/mysql-test/suite/innodb/std_data/log_corruption5.zip
index bbf0238efc9..bbf0238efc9 100644
--- a/mysql-test/suite/innodb/t/log_corruption5.zip
+++ b/mysql-test/suite/innodb/std_data/log_corruption5.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/log_corruption6.zip b/mysql-test/suite/innodb/std_data/log_corruption6.zip
index 04dd687e7c9..04dd687e7c9 100644
--- a/mysql-test/suite/innodb/t/log_corruption6.zip
+++ b/mysql-test/suite/innodb/std_data/log_corruption6.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/log_corruption.test b/mysql-test/suite/innodb/t/log_corruption.test
index 725c8db6360..664894f2c41 100644
--- a/mysql-test/suite/innodb/t/log_corruption.test
+++ b/mysql-test/suite/innodb/t/log_corruption.test
@@ -1,3 +1,4 @@
+--source include/have_unzip.inc
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
@@ -27,7 +28,7 @@ core_file
EOF
--echo # redo log from before MySQL 5.7.9
---exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption.zip -d $bugdir > $SEARCH_FILE
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption.zip -d $bugdir > $SEARCH_FILE
--error 1
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5\\.7\\.9\\.;
@@ -43,7 +44,7 @@ let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log
--echo # redo log from before MySQL 5.7.9, with corrupted log block
--remove_file $bugdir/ib_logfile0
---exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption0.zip -d $bugdir > $SEARCH_FILE
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption0.zip -d $bugdir > $SEARCH_FILE
--error 1
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5\\.7\\.9, and it appears corrupted;
@@ -51,7 +52,7 @@ let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log
--echo # redo log from "after" MySQL 5.7.9, but with invalid header checksum
--remove_file $bugdir/ib_logfile0
---exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption1.zip -d $bugdir > $SEARCH_FILE
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption1.zip -d $bugdir > $SEARCH_FILE
--error 1
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Invalid redo log header checksum;
@@ -59,7 +60,7 @@ let SEARCH_PATTERN=InnoDB: Invalid redo log header checksum;
--echo # distant future redo log format, with valid header checksum
--remove_file $bugdir/ib_logfile0
---exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption2.zip -d $bugdir > $SEARCH_FILE
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption2.zip -d $bugdir > $SEARCH_FILE
--error 1
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Unsupported redo log format. The redo log was created with malicious intentions, or perhaps\. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading-downgrading.html;
@@ -67,7 +68,7 @@ let SEARCH_PATTERN=InnoDB: Unsupported redo log format. The redo log was created
--echo # valid header, but old-format checkpoint blocks
--remove_file $bugdir/ib_logfile0
---exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption3.zip -d $bugdir > $SEARCH_FILE
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption3.zip -d $bugdir > $SEARCH_FILE
--error 1
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: No valid checkpoint found .corrupted redo log;
@@ -75,7 +76,7 @@ let SEARCH_PATTERN=InnoDB: No valid checkpoint found .corrupted redo log;
--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum
--remove_file $bugdir/ib_logfile0
---exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption4.zip -d $bugdir > $SEARCH_FILE
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption4.zip -d $bugdir > $SEARCH_FILE
# Anything below innodb_force_recovery=6 must find a valid redo log.
# Missing tablespace files are tolerated already with innodb_force_recovery=1.
--error 1
@@ -94,7 +95,7 @@ let SEARCH_PATTERN=InnoDB: Cannot create sys_virtual system tables. running in r
--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number
--remove_file $bugdir/ib_logfile0
---exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption4a.zip -d $bugdir > $SEARCH_FILE
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption4a.zip -d $bugdir > $SEARCH_FILE
# Anything below innodb_force_recovery=6 must find a valid redo log.
# Missing tablespace files are tolerated already with innodb_force_recovery=1.
--error 1
@@ -112,7 +113,7 @@ let SEARCH_PATTERN=InnoDB: Cannot create sys_virtual system tables. running in r
--echo # Test a corrupted MLOG_FILE_NAME record.
--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2
--remove_file $bugdir/ib_logfile0
---exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption5.zip -d $bugdir > $SEARCH_FILE
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption5.zip -d $bugdir > $SEARCH_FILE
--error 1
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Log scan progressed past the checkpoint lsn 1213964;
@@ -129,7 +130,7 @@ let SEARCH_PATTERN=InnoDB: Set innodb_force_recovery to ignore this error;
--echo # Test a corrupted MLOG_FILE_NAME record.
--echo # valid header, invalid checkpoint 1, valid checkpoint 2
--remove_file $bugdir/ib_logfile0
---exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption6.zip -d $bugdir > $SEARCH_FILE
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption6.zip -d $bugdir > $SEARCH_FILE
--error 1
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: ############### CORRUPT LOG RECORD FOUND ##################;