Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extra/mariabackup/backup_copy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ copy_back()
if it exists. */

ds_tmp = ds_create(dst_dir, DS_TYPE_LOCAL);
if (!(ret = copy_or_move_file(ds_tmp, LOG_FILE_NAME, LOG_FILE_NAME,
if (!(ret = copy_or_move_file(ds_tmp, "ib_logfile0", "ib_logfile0",
Comment thread
dr-m marked this conversation as resolved.
Comment thread
dr-m marked this conversation as resolved.
dst_dir, 1))) {
goto cleanup;
}
Expand Down Expand Up @@ -1869,7 +1869,7 @@ copy_back()
}

/* skip the redo log (it was already copied) */
if (!strcmp(filename, LOG_FILE_NAME)) {
if (!strcmp(filename, "ib_logfile0")) {
Comment thread
dr-m marked this conversation as resolved.
continue;
}

Expand Down
14 changes: 9 additions & 5 deletions extra/mariabackup/xtrabackup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2651,7 +2651,7 @@ static void log_hdr_init()
MYSQL_VERSION_ID / 10000, MYSQL_VERSION_ID / 100 % 100,
MYSQL_VERSION_ID % 100);
if (log_sys.is_encrypted())
log_crypt_write_header(log_hdr_buf + LOG_HEADER_CREATOR_END);
log_crypt_write_header(log_hdr_buf + LOG_HEADER_CREATOR_END, false);
mach_write_to_4(508 + log_hdr_buf, my_crc32c(0, log_hdr_buf, 508));
mach_write_to_8(log_hdr_buf + 0x1000, log_sys.last_checkpoint_lsn);
mach_write_to_8(log_hdr_buf + 0x1008, recv_sys.lsn);
Expand Down Expand Up @@ -2710,7 +2710,7 @@ static bool innodb_init()
srv_log_group_home_dir= xtrabackup_target_dir;

bool ret;
const std::string ib_logfile0{get_log_file_path()};
const std::string ib_logfile0{log_sys.get_circular_path()};
os_file_delete_if_exists_func(ib_logfile0.c_str(), nullptr);
os_file_t file= os_file_create_func(ib_logfile0.c_str(),
OS_FILE_CREATE,
Expand Down Expand Up @@ -4890,6 +4890,8 @@ static bool backup_wait_for_commit_lsn()
lsn_t last_lsn= recv_sys.lsn;

/* read the latest checkpoint lsn */
log_sys.last_checkpoint_lsn= 0;
recv_sys.file_checkpoint= 0;
if (recv_sys.find_checkpoint() == DB_SUCCESS && log_sys.is_latest())
{
metadata_to_lsn= log_sys.last_checkpoint_lsn;
Expand Down Expand Up @@ -5487,6 +5489,7 @@ static bool xtrabackup_backup_func()

srv_n_purge_threads = 1;
srv_read_only_mode = TRUE;
recv_sys.rpo = LSN_MAX;

srv_operation = SRV_OPERATION_BACKUP;
log_file_op = backup_file_op;
Expand Down Expand Up @@ -5578,10 +5581,11 @@ static bool xtrabackup_backup_func()

/* open the log file */
memset(&stat_info, 0, sizeof(MY_STAT));
dst_log_file = ds_open(backup_datasinks.m_redo, LOG_FILE_NAME, &stat_info);
dst_log_file =
Comment thread
dr-m marked this conversation as resolved.
ds_open(backup_datasinks.m_redo, "ib_logfile0", &stat_info);
if (dst_log_file == NULL) {
msg("Error: failed to open the target stream for '%s'.",
LOG_FILE_NAME);
msg("Error: failed to open the target stream"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticing a silent crash, please check if it's related


origin/MDEV-37949 218b238d6f3918c028bb595dac06c03ca5b4ea5e

Error log shows
InnoDB: Starting crash recovery from checkpoint LSN=95653039
InnoDB: End of log at LSN=95698132
Then the server silently disappears - no assertion, no error message

Please take a look
RR trace is present on SDP:-
/data/results/1772438757/Silent_crash

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there was a possible anomaly at rr record time, possibly affecting the pread64 system call. In my rr replay attempt I got the following:

2026-03-02  0:30:25 0 [Note] InnoDB: End of log at LSN=95698132
[FATAL src/ReplaySession.cc:755:check_pending_sig()] 
 (task 125299 (rec:1049701) at time 3447)
 -> Assertion `false' failed to hold. Replaying `SIGNAL: SIGSEGV(det)': expecting tracee signal or trap, but instead at `pread64' (ticks: 7914513)

When I attach GDB to the crashed rr replay I can see that it occurred deep inside the following:

#21 0x00005e20ebf7f5a1 in buf_read_page (page_id=page_id@entry={m_id = 0x3}, err=err@entry=0x7ffc1851501c, chain=@0x5e20ef0cc060: {first = 0x79e096001520}, unzip=unzip@entry=0x1)
    at /data/Server/MDEV-37949A/storage/innobase/buf/buf0rea.cc:540
#22 0x00005e20ebf63909 in buf_page_get_gen (page_id={m_id = 0x3}, zip_size=zip_size@entry=0x0, rw_latch=rw_latch@entry=RW_NO_LATCH, guess=guess@entry=0x0, mode=mode@entry=0x9, 
    mtr=mtr@entry=0x7ffc18515020, err=0x7ffc1851501c) at /data/Server/MDEV-37949A/storage/innobase/buf/buf0buf.cc:2781
#23 0x00005e20ebddf6c0 in recv_sys_t::recover (this=<optimized out>, page_id=page_id@entry={m_id = 0x3}, mtr=mtr@entry=0x7ffc18515020, err=err@entry=0x7ffc1851501c)
    at /data/Server/MDEV-37949A/storage/innobase/log/log0recv.cc:4518
#24 0x00005e20ec015dd7 in ibuf_upgrade_needed () at /data/Server/MDEV-37949A/storage/innobase/ibuf/ibuf0ibuf.cc:1029
#25 0x00005e20ebee9e1e in srv_start (create_new_db=<optimized out>) at /data/Server/MDEV-37949A/storage/innobase/srv/srv0start.cc:1594
#26 0x00005e20ebd4a2b6 in innodb_init (p=<optimized out>) at /data/Server/MDEV-37949A/storage/innobase/handler/ha_innodb.cc:4187

No buffer page access code path should be changed in this pull request, so in any case it should not be related to these changes.

This could be a bug in the underlying Linux kernel or in the way how rr instruments system calls.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we open a seperate MDEV for this issue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can reproduce and diagnose the problem, you could file a bug against https://github.com/rr-debugger/rr/. It could be a race condition between ptrace and signal handling, something similar to https://lkml.org/lkml/2021/10/31/311 perhaps. It definitely is not something that https://jira.mariadb.org is tracking.

" for 'ib_logfile0'.");
goto fail;
}

Expand Down
4 changes: 4 additions & 0 deletions mysql-test/include/innodb_encrypt_log.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
# (see include/innodb_encrypt_log.combinations)

--source include/have_innodb.inc
if ($MTR_COMBINATION_CRYPT)
{
--source ../suite/encryption/include/skip_innodb_log_archive.inc
}
2 changes: 1 addition & 1 deletion mysql-test/main/analyze_engine_stats2.result
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repeat(uuid(), 7)
from seq_1_to_16384;
commit;
SET GLOBAL innodb_fast_shutdown=0;
# restart
# restart: --innodb-log-recovery-start=0
set log_slow_verbosity='engine';
set long_query_time=0.0;
set @js='$analyze_output';
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/main/analyze_engine_stats2.test
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ from seq_1_to_16384;
commit;

SET GLOBAL innodb_fast_shutdown=0;
# Avoid any crash recovery that would load pages.
--let $restart_parameters=--innodb-log-recovery-start=0
Comment thread
dr-m marked this conversation as resolved.
source include/restart_mysqld.inc;
set log_slow_verbosity='engine';
set long_query_time=0.0;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/analyze_stmt_prefetch_count.result
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ commit;
# (in the test's .opt file we've disabled buffer pool saving/loading
# and also tried to disable any background activity)
SET GLOBAL innodb_fast_shutdown=0;
# restart
# restart: --innodb-log-recovery-start=0
set @innodb_pages_read0=
(select variable_value
from information_schema.session_status
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/main/analyze_stmt_prefetch_count.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ commit;
--echo # (in the test's .opt file we've disabled buffer pool saving/loading
--echo # and also tried to disable any background activity)
SET GLOBAL innodb_fast_shutdown=0;
# Avoid any crash recovery that would load pages.
--let $restart_parameters=--innodb-log-recovery-start=0
Comment thread
dr-m marked this conversation as resolved.
--source include/restart_mysqld.inc

set @innodb_pages_read0=
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/mariadb-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ END
my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions.
my $warn_seconds = 60;

my $rebootstrap_re= '--innodb[-_](?:page[-_]size|checksum[-_]algorithm|undo[-_]tablespaces|log[-_]group[-_]home[-_]dir|data[-_]home[-_]dir)|data[-_]file[-_]path|force_rebootstrap';
my $rebootstrap_re= '--innodb[-_](?:page[-_]size|checksum[-_]algorithm|undo[-_]tablespaces|log[-_](group[-_]home[-_]dir|archive)|data[-_]home[-_]dir)|data[-_]file[-_]path|force_rebootstrap';

sub testcase_timeout ($) { return $opt_testcase_timeout * 60; }
sub check_timeout ($) { return testcase_timeout($_[0]); }
Expand Down Expand Up @@ -3146,7 +3146,7 @@ sub mysql_install_db {
# need to be given to the bootstrap process as well as the
# server process.
foreach my $extra_opt ( @opt_extra_mysqld_opt ) {
if ($extra_opt =~ /--innodb/) {
if ($extra_opt =~ /--((loose|skip)[-_])*innodb/) {
mtr_add_arg($args, $extra_opt);
}
}
Expand Down
12 changes: 12 additions & 0 deletions mysql-test/suite/encryption/include/skip_innodb_log_archive.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--disable_query_log
SET STATEMENT sql_log_bin=0 FOR
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed\\.");
SET STATEMENT sql_log_bin=0 FOR
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
SET STATEMENT sql_log_bin=0 FOR
call mtr.add_suppression("InnoDB: ib_0.*\\.log does not match innodb_encrypt_log");
--enable_query_log
if (`SELECT COUNT(*)=0 FROM information_schema.global_variables where variable_name='innodb_log_archive' and variable_value='OFF'`)
{
--skip Test requires innodb_log_archive=OFF
}
2 changes: 1 addition & 1 deletion mysql-test/suite/encryption/r/doublewrite_debug.result
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ set global innodb_buf_flush_list_now = 1;
# restart
FOUND 1 /InnoDB: Encrypted page \[page id: space=[1-9]*, page number=3\] in file .*test.t1.ibd looks corrupted/ in mysqld.1.err
select * from t1;
ERROR 42000: Unknown storage engine 'InnoDB'
Got one of the listed errors
# shutdown server
# remove datadir
# xtrabackup move back
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/suite/encryption/r/innodb-bad-key-change.result
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ foobar 1
foobar 2

# Restart server with keysbad3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt --innodb-log-recovery-start=0
SELECT * FROM t1;
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt --innodb-log-recovery-start=0
DROP TABLE t1;
# Start server with keys3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
Expand All @@ -44,7 +44,7 @@ CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGIN
INSERT INTO t2 VALUES ('foobar',1,2);

# Restart server with keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt --innodb-log-recovery-start=0
SELECT * FROM t2;
ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
SELECT * FROM t2 where id = 1;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/encryption/r/innodb-bad-key-change2.result
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space="
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt --innodb-log-recovery-start=0
SELECT * FROM t1;
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SHOW WARNINGS;
Expand All @@ -40,7 +40,7 @@ Level Code Message
FLUSH TABLES t1 FOR EXPORT;
backup: t1
UNLOCK TABLES;
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt --innodb-log-recovery-start=0
ALTER TABLE t1 DISCARD TABLESPACE;
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
DROP TABLE t1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ backup: t1
UNLOCK TABLES;
ALTER TABLE t1 DISCARD TABLESPACE;
restore: t1 .ibd and .cfg files
# restart
# restart: --innodb-log-recovery-start=0
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW CREATE TABLE t1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ insert into t1 values (1, repeat('secret',6000));
insert into t2 values (1, repeat('secret',6000));
insert into t3 values (1, repeat('secret',6000));
# Restart mysqld --file-key-management-filename=keys3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt --innodb-log-recovery-start=0
select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CREATE TABLE `t1` (
) ENGINE=InnoDB;
insert into t1 values (1,2,'maria','db','encryption');
alter table t1 encrypted='yes' `encryption_key_id`=1;
# restart: --innodb-encrypt-tables=OFF
# restart: --innodb-encrypt-tables=OFF --innodb-log-recovery-start=0
select * from t1;
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
select * from t5;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/encryption/r/innodb-force-corrupt.result
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ INSERT INTO t3 select * from t1;
COMMIT;
# Backup tables before corrupting
# Corrupt tables
# restart
# restart: --innodb-log-recovery-start=0
SELECT * FROM t1;
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SELECT * FROM t2;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/encryption/r/innodb-missing-key.result
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t3 SELECT * FROM t1;

# Restart server with keys3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt --innodb-log-recovery-start=0
set global innodb_encryption_rotate_key_age = 1;
use test;
CREATE TABLE t4(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ select variable_value > 0 from information_schema.global_status
where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
variable_value > 0
1
# restart: --innodb-encrypt-tables=OFF
# restart: --innodb-encrypt-tables=OFF --innodb-log-recovery-start=0
set global innodb_compression_algorithm = 1;
alter table innodb_normal engine=innodb page_compressed=DEFAULT;
show create table innodb_normal;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/encryption/r/innodb-read-only.result
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WHERE NAME LIKE '%encrypt%';
SELECT @encryption_threads_running;
@encryption_threads_running
4
# restart: --innodb-read-only=1 --innodb-encrypt-tables=1
# restart: --innodb-read-only=1 --innodb-encrypt-tables=1 --innodb-log-recovery-start=0
SET GLOBAL innodb_encryption_threads=4;
SET @encryption_threads_running=0;
SELECT COUNT(*) INTO @encryption_threads_running
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err
# empty redo log from before MariaDB 10.2.2
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-recovery-target=12345

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getting this error :-

`# 2026-04-23T12:31:05 [3898794] | 2026-04-23 12:31:05 0 [ERROR] InnoDB: ib_000000001e7f1000.log is in unrecognized format
# 2026-04-23T12:31:05 [3898794] | 2026-04-23 12:31:05 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1425] with error Generic error`

Log files present at SDP:
/data/results/1776971149/000931

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recovery will only consider the all-zero file ib_000000001e7f1000 because there is a discontinuity: the 268435456-byte file ib_000000001a7f4000.log would be expected to be followed by ib_000000002a7f1000.log. If I rename the dummy file to the expected name, then the recovery will proceed past this point:

2026-04-24 13:11:38 0 [Note] InnoDB: innodb_buffer_pool_size_max=8388614m, innodb_buffer_pool_size=10240m
2026-04-24 13:11:38 0 [Note] InnoDB: Initialized memory pressure event listener
2026-04-24 13:11:38 0 [Note] InnoDB: Completed initialization of buffer pool
2026-04-24 13:11:38 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=489767822
2026-04-24 13:11:38 0 [Note] InnoDB: End of log at LSN=490002980
2026-04-24 13:11:38 0 [Note] InnoDB: To recover: 94 pages
2026-04-24 13:11:38 0 [Note] InnoDB: Last binlog file './mysql-bin.000001', position 5953096
2026-04-24 13:11:38 0 [Warning] InnoDB: Cannot change innodb_undo_tablespaces=0 because previous shutdown was not with innodb_fast_shutdown=0
2026-04-24 13:11:38 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
2026-04-24 13:11:38 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
2026-04-24 13:11:38 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2026-04-24 13:11:38 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2026-04-24 13:11:38 0 [Note] InnoDB: log sequence number 490002980 (memory-mapped); transaction id 28255

To analyze the root cause of this failure, I would need a log that shows the sequence of events that led to this file being created during a previous execution of mariadbd in the same data directory. rr replay would be the preferred format. It is possible that this error will be fixed by the revision 4c3af6a, which I did not push to this branch yet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The revision to the spare archive log creation is now included in c819703.

SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
0
FOUND 1 /InnoDB: cannot fulfill innodb_log_recovery_target=12345!=/ in mysqld.1.err
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=4m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/encryption/t/bulk_insert.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
--source include/skip_innodb_log_archive.inc # innodb_encrypt_log
--source include/have_sequence.inc
--source include/have_file_key_management_plugin.inc

Expand Down
4 changes: 3 additions & 1 deletion mysql-test/suite/encryption/t/corrupted_during_recovery.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
--source ../../suite/innodb/include/no_checkpoint_prepare.inc
--source include/have_file_key_management_plugin.inc

--disable_query_log
Expand All @@ -17,6 +18,7 @@ CREATE TABLE t1(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES;
INSERT INTO t1 VALUES(1);
# Force a redo log checkpoint.
let $restart_noprint=2;
let $restart_parameters=--innodb-log-recovery-start=0;
--source include/restart_mysqld.inc
--source ../../suite/innodb/include/no_checkpoint_start.inc
CREATE TABLE t2(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES;
Expand Down Expand Up @@ -57,7 +59,7 @@ SELECT * FROM t1;
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[1].ibd looks corrupted; key_version=");
call mtr.add_suppression("Table .*t1.* is corrupted. Please drop the table and recreate.");
--enable_query_log
let $restart_parameters=--innodb_force_recovery=1 --skip-innodb-buffer-pool-load-at-startup;
let $restart_parameters=--innodb-log-recovery-start=0 --innodb_force_recovery=1 --skip-innodb-buffer-pool-load-at-startup;
--source include/restart_mysqld.inc

--error ER_TABLE_CORRUPT
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/encryption/t/debug_key_management.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-- source include/have_innodb.inc
-- source include/skip_innodb_log_archive.inc # innodb_encrypt_log
-- source include/have_debug.inc
-- source include/innodb_undo_tablespaces.inc
-- source include/not_embedded.inc
Expand Down
4 changes: 3 additions & 1 deletion mysql-test/suite/encryption/t/doublewrite_debug.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
--source include/have_innodb.inc
--source ../../suite/innodb/include/skip_innodb_log_archive.inc #mariadb-backup
--source include/have_debug.inc
--source include/not_embedded.inc
--source include/have_file_key_management_plugin.inc
--source ../../suite/innodb/include/no_checkpoint_prepare.inc
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[12]\\.ibd looks corrupted");
call mtr.add_suppression("InnoDB: Unable to apply log to corrupted page ");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
Expand Down Expand Up @@ -233,7 +235,7 @@ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN=InnoDB: Encrypted page \\[page id: space=[1-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted;
--source include/search_pattern_in_file.inc

--error ER_UNKNOWN_STORAGE_ENGINE
--error ER_UNKNOWN_STORAGE_ENGINE,ER_TABLE_CORRUPT
select * from t1;

--source ../../mariabackup/include/restart_and_restore.inc
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/encryption/t/encrypt_and_grep.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-- source include/have_innodb.inc
-- source include/skip_innodb_log_archive.inc # innodb_encrypt_log
-- source include/innodb_undo_tablespaces.inc
-- source include/have_file_key_management_plugin.inc

Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/encryption/t/encryption_force.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-- source include/have_innodb.inc
-- source include/skip_innodb_log_archive.inc # innodb_encrypt_log
-- source include/have_partition.inc
-- source include/have_example_key_management_plugin.inc

Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/encryption/t/file_creation.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
--source ../../suite/innodb/include/no_checkpoint_prepare.inc
--source include/have_example_key_management_plugin.inc
let $restart_noprint=2;
# embedded does not support restart
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/encryption/t/innochecksum.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Require InnoDB
-- source include/have_innodb.inc
-- source include/have_file_key_management_plugin.inc
-- source include/skip_innodb_log_archive.inc # depends on innodb_log_archive=OFF checkpoint logic
-- source include/innodb_page_size_small.inc
-- source include/innodb_checksum_algorithm.inc
-- source include/maybe_debug.inc
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/suite/encryption/t/innodb-bad-key-change.test
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ SELECT * FROM t1;

--echo
--echo # Restart server with keysbad3.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt --innodb-log-recovery-start=0
-- source include/restart_mysqld.inc

--disable_warnings
--error ER_TABLE_CORRUPT
SELECT * FROM t1;
--enable_warnings

-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt --innodb-log-recovery-start=0
-- source include/restart_mysqld.inc

--replace_regex /key_id [1-9][0-9]*/\1 /
Expand All @@ -69,7 +69,7 @@ INSERT INTO t2 VALUES ('foobar',1,2);

--echo
--echo # Restart server with keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt --innodb-log-recovery-start=0
-- source include/restart_mysqld.inc

--disable_warnings
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/encryption/t/innodb-bad-key-change2.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');

--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt --innodb-log-recovery-start=0
--source include/restart_mysqld.inc

--error ER_TABLE_CORRUPT
Expand Down Expand Up @@ -60,7 +60,7 @@ ib_backup_tablespaces("test", "t1");
EOF
UNLOCK TABLES;

--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt --innodb-log-recovery-start=0
--source include/restart_mysqld.inc

--error ER_TABLE_CORRUPT
Expand Down
Loading
Loading