Skip to content

Commit 21239bb

Browse files
committed
After-merge fix to innodb.log_corruption
1 parent 6dd302d commit 21239bb

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
124124
WHERE engine = 'innodb'
125125
AND support IN ('YES', 'DEFAULT', 'ENABLED');
126126
COUNT(*)
127-
0
128-
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
127+
1
128+
FOUND 2 /InnoDB: Upgrading redo log:/ in mysqld.1.err
129129
# Minimal MariaDB 10.1.21 encrypted redo log
130130
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
131131
AND support IN ('YES', 'DEFAULT', 'ENABLED');

mysql-test/suite/innodb/t/log_corruption.test

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,15 @@ print OUT pack("Nx[5]nx[5]", 1, 0x1286);
428428
print OUT "ibbackup was here!!!1!";
429429
print OUT pack("x[470]N", 0x52b54540);
430430
# In encryption.innodb_log_corruption the previous step would
431-
# replace the block with an encrypted one. Rewrite it as it was.
432-
die unless seek(OUT, 0x800, 0);
431+
# replace the block with an encrypted one and update the checkpoint.
432+
# Restore them.
433+
# invalid (all-zero) checkpoint page 1 and an empty log page
434+
print OUT chr(0) x 1024;
435+
# valid checkpoint block 2
436+
print OUT pack("x[12]NNNx[264]", 0x12860c, 0, 0x80c);
437+
# pointer to the MLOG_CHECKPOINT record, and checkpoint page checksum
438+
print OUT pack("H*x[204]NNN", "590DBAACFE922582", 0x128612, 0, 0x101741b);
439+
# log page
433440
print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 1, 0x46c8a2a2);
434441
close OUT or die;
435442
EOF

0 commit comments

Comments
 (0)