summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-18 17:17:52 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-18 17:17:52 +0300
commit532333ee4813cf822083d6bb712cafa11ba205e0 (patch)
tree81e4ad34c43f552a95f3f99bf71fddda22c548a9
parenta5ee77393f93e6b609ae2db53ed683404fd0d588 (diff)
downloadmariadb-git-532333ee4813cf822083d6bb712cafa11ba205e0.tar.gz
MDEV-12893 innodb.log_data_file_size failed in buildbot with InnoDB: Database page corruption
Another fix (work around MDEV-12699): Ensure that the 1234-byte truncated page is all zero, so that after data file extension pads the page with zeroes to full page size, the page will read as a valid one (consisting of zero bytes only).
-rw-r--r--mysql-test/suite/innodb/t/log_data_file_size.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/log_data_file_size.test b/mysql-test/suite/innodb/t/log_data_file_size.test
index 877723a3734..75e38673f69 100644
--- a/mysql-test/suite/innodb/t/log_data_file_size.test
+++ b/mysql-test/suite/innodb/t/log_data_file_size.test
@@ -65,6 +65,9 @@ truncate(FILE, $page_size * 4);
close FILE;
open(FILE, "+<", "$ENV{'MYSQLD_DATADIR'}test/ibd4f.ibd") or die;
truncate(FILE, $page_size * 4 + 1234);
+# Work around MDEV-12699 and ensure that the truncated page is all-zero.
+sysseek(FILE, $page_size * 4, 0);
+syswrite(FILE, chr(0) x 1234);
close FILE;
open(FILE, "+<", "$ENV{'MYSQLD_DATADIR'}test/ibd5.ibd") or die;
truncate(FILE, $page_size * 5);