summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2017-02-07 20:08:07 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2017-02-09 08:49:13 +0200
commit0340067608432503d335f9d9f4e8ef7da5d9d13f (patch)
tree73602aa4b8a62ae023997b60c5822c5e50150349 /mysql-test/suite/innodb
parent9017a05d878c44d219f2870126651230c99349a1 (diff)
downloadmariadb-git-0340067608432503d335f9d9f4e8ef7da5d9d13f.tar.gz
After review fixes for MDEV-11759.
buf_page_is_checksum_valid_crc32() buf_page_is_checksum_valid_innodb() buf_page_is_checksum_valid_none(): Use ULINTPF instead of %lu and %u for ib_uint32_t fil_space_verify_crypt_checksum(): Check that page is really empty if checksum and LSN are zero. fil_space_verify_crypt_checksum(): Correct the comment to be more agurate. buf0buf.h: Remove unnecessary is_corrupt variable from buf_page_t structure.
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug14147491.result9
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491.test21
2 files changed, 3 insertions, 27 deletions
diff --git a/mysql-test/suite/innodb/r/innodb_bug14147491.result b/mysql-test/suite/innodb/r/innodb_bug14147491.result
index 1a8249f9e54..ea725dda257 100644
--- a/mysql-test/suite/innodb/r/innodb_bug14147491.result
+++ b/mysql-test/suite/innodb/r/innodb_bug14147491.result
@@ -12,22 +12,14 @@ CALL mtr.add_suppression("InnoDB: fix the corruption by dumping, dropping, and r
CALL mtr.add_suppression("InnoDB: the corrupt table. You can use CHECK");
CALL mtr.add_suppression("InnoDB: TABLE to scan your table for corruption.");
CALL mtr.add_suppression("InnoDB: See also .* about forcing recovery.");
-flush tables;
# Create and populate the table to be corrupted
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
INSERT INTO t1 (b) VALUES ('corrupt me');
-# Write file to make mysql-test-run.pl expect the "crash", but don't
-# start it until it's told to
-# We give 30 seconds to do a clean shutdown because we do not want
-# to redo apply the pages of t1.ibd at the time of recovery.
-# We want SQL to initiate the first access to t1.ibd.
-# Wait until disconnected.
# Backup the t1.ibd before corrupting
# Corrupt the table
Munged a string.
Munged a string.
-# Write file to make mysql-test-run.pl start up the server again
SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
# Write file to make mysql-test-run.pl expect the "crash", but don't
# start it until it's told to
@@ -36,6 +28,5 @@ SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
SELECT * FROM t1;
ERROR HY000: Lost connection to MySQL server during query
# Restore the original t1.ibd
-# Write file to make mysql-test-run.pl start up the server again
# Cleanup
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491.test b/mysql-test/suite/innodb/t/innodb_bug14147491.test
index 853c7e63f35..5776b2c2e37 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491.test
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test
@@ -33,8 +33,6 @@ CALL mtr.add_suppression("InnoDB: fix the corruption by dumping, dropping, and r
CALL mtr.add_suppression("InnoDB: the corrupt table. You can use CHECK");
CALL mtr.add_suppression("InnoDB: TABLE to scan your table for corruption.");
CALL mtr.add_suppression("InnoDB: See also .* about forcing recovery.");
-flush tables;
-
--echo # Create and populate the table to be corrupted
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
@@ -52,16 +50,9 @@ INSERT INTO t1 (b) VALUES ('corrupt me');
let $MYSQLD_DATADIR=`select @@datadir`;
let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
---echo # Write file to make mysql-test-run.pl expect the "crash", but don't
---echo # start it until it's told to
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---echo # We give 30 seconds to do a clean shutdown because we do not want
---echo # to redo apply the pages of t1.ibd at the time of recovery.
---echo # We want SQL to initiate the first access to t1.ibd.
-shutdown_server 30;
-
---echo # Wait until disconnected.
+--source include/shutdown_mysqld.inc
--source include/wait_until_disconnected.inc
--echo # Backup the t1.ibd before corrupting
@@ -94,10 +85,7 @@ while ($len = sysread IBD_FILE, $chunk, 1024)
close IBD_FILE;
EOF
---echo # Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
+--source include/start_mysqld.inc
SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
@@ -119,10 +107,7 @@ SLEEP 1;
--remove_file $MYSQLD_DATADIR/test/t1.ibd
--move_file $MYSQLD_DATADIR/test/t1.ibd.backup $MYSQLD_DATADIR/test/t1.ibd
---echo # Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
+--source include/start_mysqld.inc
# Note SET DEBUG = '-d,innodb_page_corruption_retries' is not required
# because the session information is lost after server restart