mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-34705: Binlog-in-engine: Implement page checksum
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@@ -21,6 +21,12 @@ Log_name File_size
|
||||
binlog-000000.ibb 49152
|
||||
binlog-000001.ibb 262144
|
||||
binlog-000002.ibb 262144
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
CALL mtr.add_suppression("InnoDB: Page corruption in binlog tablespace file page number 0");
|
||||
FLUSH BINARY LOGS;
|
||||
FLUSH BINARY LOGS;
|
||||
SHOW BINLOG EVENTS IN 'binlog-000000.ibb' LIMIT 1;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: error reading event data
|
||||
RESET MASTER;
|
||||
SHOW BINARY LOGS;
|
||||
Log_name File_size
|
||||
|
@@ -26,6 +26,30 @@ FLUSH BINARY LOGS;
|
||||
--source include/wait_for_engine_binlog.inc
|
||||
SHOW BINARY LOGS;
|
||||
|
||||
# Flush couple logs so we are sure the first file is on disk.
|
||||
# Corrupt one bit in the first page of the first file to test that crc32
|
||||
# mismatch is caught.
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
CALL mtr.add_suppression("InnoDB: Page corruption in binlog tablespace file page number 0");
|
||||
FLUSH BINARY LOGS;
|
||||
FLUSH BINARY LOGS;
|
||||
--let $file= binlog-000000.ibb
|
||||
--let $datadir= `SELECT @@datadir`
|
||||
--let BINLOG_FILE= $datadir/$file
|
||||
perl;
|
||||
open F, '+<', $ENV{BINLOG_FILE} or die $!;
|
||||
sysseek F, 50, 0 or die $!;
|
||||
my $x;
|
||||
sysread F, $x, 1 or die $!;
|
||||
$x= chr(ord($x) ^ (1 <<3));
|
||||
sysseek F, 50, 0 or die $!;
|
||||
syswrite F, $x, 1 or die $!;
|
||||
EOF
|
||||
|
||||
--error ER_ERROR_WHEN_EXECUTING_COMMAND
|
||||
eval SHOW BINLOG EVENTS IN '$file' LIMIT 1;
|
||||
|
||||
|
||||
RESET MASTER;
|
||||
--let $binlog_name= binlog-000001.ibb
|
||||
--let $binlog_size= 262144
|
||||
|
Reference in New Issue
Block a user