Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
13.0, 13.1
-
Can result in hang or crash
Description
--source include/have_innodb.inc |
--source include/have_debug.inc |
# Archived log files of 8 MiB, 4 MiB, 8 MiB |
SET GLOBAL innodb_log_file_size=8388608; |
SET GLOBAL innodb_log_archive=ON; |
SET GLOBAL innodb_log_file_size=4194304; |
CREATE TABLE t (b LONGBLOB) ENGINE=InnoDB; |
let $i= 9;
|
while ($i)
|
{
|
INSERT INTO t VALUES (REPEAT('x', 1048576)); |
dec $i; |
}
|
SET GLOBAL innodb_log_checkpoint_now=ON; |
SET GLOBAL innodb_log_file_size=8388608; |
let $i= 4;
|
while ($i)
|
{
|
INSERT INTO t VALUES (REPEAT('x', 1048576)); |
dec $i; |
}
|
--source include/shutdown_mysqld.inc |
# innodb_log_recovery_start= the first checkpoint in the first (8 MiB) file |
perl;
|
my $dir= "$ENV{MYSQLTEST_VARDIR}/mysqld.1/data"; |
opendir(D, $dir) or die "Unable to open $dir\n"; |
my ($file)= sort grep { /^ib_[0-9a-f]{16}\.log$/ } readdir(D);
|
open(F, "<", "$dir/$file") or die "Unable to open $file\n"; |
binmode F;
|
read(F, my $offset, 8) == 8 or die "Unable to read $file\n"; |
close F; |
my $start= hex(substr($file, 3, 16)) + unpack("Q>", $offset) - 12288; |
open(F, ">", "$ENV{MYSQLTEST_VARDIR}/tmp/recovery_start.inc") or die; |
print F "let \$start= $start;\n"; |
close F; |
EOF
|
--source $MYSQLTEST_VARDIR/tmp/recovery_start.inc |
--remove_file $MYSQLTEST_VARDIR/tmp/recovery_start.inc |
--let $restart_noprint= 1 |
--let $restart_parameters= --innodb-log-recovery-start=$start --innodb-log-file-mmap=OFF --innodb-log-buffer-size=8m --innodb-buffer-pool-size=32m |
--source include/start_mysqld.inc |
let $innodb= query_get_value(SELECT COUNT(*) AS c FROM information_schema.engines WHERE engine='InnoDB' AND support<>'NO', c, 1); |
if (!$innodb) |
{
|
--die Recovery from an older checkpoint failed reading the next, smaller archived log file |
}
|
--let $restart_parameters= |
--source include/restart_mysqld.inc |
DROP TABLE t; |
SET GLOBAL innodb_log_archive=OFF; |
--source include/shutdown_mysqld.inc |
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.1/data ib_0*.log |
--source include/start_mysqld.inc |
Leads to :-
|
Bug Detection Matrix |
CS 13.0 dbg 261026 620a4b5624222048fece7fe1789978ae0675cae2 INNODB_ERROR|pread(log) returned 0, operating system error 2
|
CS 13.0 opt 261026 620a4b5624222048fece7fe1789978ae0675cae2 No bug found
|
CS 13.2 dbg 261026 c894d97781b54fbf074677c9d67f81cd60a162ac INNODB_ERROR|pread(log) returned 0, operating system error 2
|
CS 13.2 opt 261026 c894d97781b54fbf074677c9d67f81cd60a162ac No bug found
|
Attachments
Issue Links
- is caused by
-
MDEV-37949 Implement innodb_log_archive
-
- Closed
-