Skip to content

Commit d39b6f1

Browse files
committed
Merge MDEV-37949
2 parents b07a36e + 076a99e commit d39b6f1

191 files changed

Lines changed: 4111 additions & 895 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

extra/mariabackup/backup_copy.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,7 @@ copy_back()
17721772
if it exists. */
17731773

17741774
ds_tmp = ds_create(dst_dir, DS_TYPE_LOCAL);
1775-
if (!(ret = copy_or_move_file(ds_tmp, LOG_FILE_NAME, LOG_FILE_NAME,
1775+
if (!(ret = copy_or_move_file(ds_tmp, "ib_logfile0", "ib_logfile0",
17761776
dst_dir, 1))) {
17771777
goto cleanup;
17781778
}
@@ -1869,7 +1869,7 @@ copy_back()
18691869
}
18701870

18711871
/* skip the redo log (it was already copied) */
1872-
if (!strcmp(filename, LOG_FILE_NAME)) {
1872+
if (!strcmp(filename, "ib_logfile0")) {
18731873
continue;
18741874
}
18751875

extra/mariabackup/xtrabackup.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2710,7 +2710,7 @@ static bool innodb_init()
27102710
srv_log_group_home_dir= xtrabackup_target_dir;
27112711

27122712
bool ret;
2713-
const std::string ib_logfile0{get_log_file_path()};
2713+
const std::string ib_logfile0{log_sys.get_circular_path()};
27142714
os_file_delete_if_exists_func(ib_logfile0.c_str(), nullptr);
27152715
os_file_t file= os_file_create_func(ib_logfile0.c_str(),
27162716
OS_FILE_CREATE,
@@ -4890,6 +4890,8 @@ static bool backup_wait_for_commit_lsn()
48904890
lsn_t last_lsn= recv_sys.lsn;
48914891

48924892
/* read the latest checkpoint lsn */
4893+
log_sys.last_checkpoint_lsn= 0;
4894+
recv_sys.file_checkpoint= 0;
48934895
if (recv_sys.find_checkpoint() == DB_SUCCESS && log_sys.is_latest())
48944896
{
48954897
metadata_to_lsn= log_sys.last_checkpoint_lsn;
@@ -5487,6 +5489,7 @@ static bool xtrabackup_backup_func()
54875489

54885490
srv_n_purge_threads = 1;
54895491
srv_read_only_mode = TRUE;
5492+
recv_sys.rpo = LSN_MAX;
54905493

54915494
srv_operation = SRV_OPERATION_BACKUP;
54925495
log_file_op = backup_file_op;
@@ -5578,10 +5581,11 @@ static bool xtrabackup_backup_func()
55785581

55795582
/* open the log file */
55805583
memset(&stat_info, 0, sizeof(MY_STAT));
5581-
dst_log_file = ds_open(backup_datasinks.m_redo, LOG_FILE_NAME, &stat_info);
5584+
dst_log_file =
5585+
ds_open(backup_datasinks.m_redo, "ib_logfile0", &stat_info);
55825586
if (dst_log_file == NULL) {
5583-
msg("Error: failed to open the target stream for '%s'.",
5584-
LOG_FILE_NAME);
5587+
msg("Error: failed to open the target stream"
5588+
" for 'ib_logfile0'.");
55855589
goto fail;
55865590
}
55875591

mysql-test/include/innodb_encrypt_log.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
# (see include/innodb_encrypt_log.combinations)
33

44
--source include/have_innodb.inc
5+
if ($MTR_COMBINATION_CRYPT)
6+
{
7+
--source ../suite/encryption/include/skip_innodb_log_archive.inc
8+
}

mysql-test/main/analyze_engine_stats2.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repeat(uuid(), 7)
1818
from seq_1_to_16384;
1919
commit;
2020
SET GLOBAL innodb_fast_shutdown=0;
21-
# restart
21+
# restart: --innodb-log-recovery-start=0
2222
set log_slow_verbosity='engine';
2323
set long_query_time=0.0;
2424
set @js='$analyze_output';

mysql-test/main/analyze_engine_stats2.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ from seq_1_to_16384;
3232
commit;
3333

3434
SET GLOBAL innodb_fast_shutdown=0;
35+
# Avoid any crash recovery that would load pages.
36+
--let $restart_parameters=--innodb-log-recovery-start=0
3537
source include/restart_mysqld.inc;
3638
set log_slow_verbosity='engine';
3739
set long_query_time=0.0;

mysql-test/main/analyze_stmt_prefetch_count.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ commit;
1919
# (in the test's .opt file we've disabled buffer pool saving/loading
2020
# and also tried to disable any background activity)
2121
SET GLOBAL innodb_fast_shutdown=0;
22-
# restart
22+
# restart: --innodb-log-recovery-start=0
2323
set @innodb_pages_read0=
2424
(select variable_value
2525
from information_schema.session_status

mysql-test/main/analyze_stmt_prefetch_count.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ commit;
2828
--echo # (in the test's .opt file we've disabled buffer pool saving/loading
2929
--echo # and also tried to disable any background activity)
3030
SET GLOBAL innodb_fast_shutdown=0;
31+
# Avoid any crash recovery that would load pages.
32+
--let $restart_parameters=--innodb-log-recovery-start=0
3133
--source include/restart_mysqld.inc
3234

3335
set @innodb_pages_read0=

mysql-test/mariadb-test-run.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ END
326326
my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions.
327327
my $warn_seconds = 60;
328328

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

331331
sub testcase_timeout ($) { return $opt_testcase_timeout * 60; }
332332
sub check_timeout ($) { return testcase_timeout($_[0]); }
@@ -3145,7 +3145,7 @@ sub mysql_install_db {
31453145
# need to be given to the bootstrap process as well as the
31463146
# server process.
31473147
foreach my $extra_opt ( @opt_extra_mysqld_opt ) {
3148-
if ($extra_opt =~ /--innodb/) {
3148+
if ($extra_opt =~ /--((loose|skip)[-_])*innodb/) {
31493149
mtr_add_arg($args, $extra_opt);
31503150
}
31513151
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--disable_query_log
2+
SET STATEMENT sql_log_bin=0 FOR
3+
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed\\.");
4+
SET STATEMENT sql_log_bin=0 FOR
5+
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
6+
SET STATEMENT sql_log_bin=0 FOR
7+
call mtr.add_suppression("InnoDB: ib_0.*\\.log does not match innodb_encrypt_log");
8+
--enable_query_log
9+
if (`SELECT COUNT(*)=0 FROM information_schema.global_variables where variable_name='innodb_log_archive' and variable_value='OFF'`)
10+
{
11+
--skip Test requires innodb_log_archive=OFF
12+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ set global innodb_buf_flush_list_now = 1;
8282
# restart
8383
FOUND 1 /InnoDB: Encrypted page \[page id: space=[1-9]*, page number=3\] in file .*test.t1.ibd looks corrupted/ in mysqld.1.err
8484
select * from t1;
85-
ERROR 42000: Unknown storage engine 'InnoDB'
85+
Got one of the listed errors
8686
# shutdown server
8787
# remove datadir
8888
# xtrabackup move back

0 commit comments

Comments
 (0)