mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge 10.6 into 10.11
This commit is contained in:
@@ -12,8 +12,9 @@ let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
|
||||
let MYSQLD_DATADIR=`select @@datadir`;
|
||||
let ALGO=`select @@innodb_checksum_algorithm`;
|
||||
|
||||
create table t1 (f1 int primary key, f2 blob)page_compressed = 1 engine=innodb stats_persistent=0;
|
||||
create table t2(f1 int primary key, f2 blob)engine=innodb stats_persistent=0;
|
||||
create table t1 (f1 int primary key, f2 blob)page_compressed=1 engine=innodb encrypted=yes stats_persistent=0;
|
||||
create table t2(f1 int primary key, f2 blob)engine=innodb encrypted=yes stats_persistent=0;
|
||||
create table t3(f1 int primary key, f2 blob)page_compressed=1 engine=innodb encrypted=no stats_persistent=0;
|
||||
|
||||
start transaction;
|
||||
insert into t1 values(1, repeat('#',12));
|
||||
@@ -22,6 +23,7 @@ insert into t1 values(3, repeat('/',12));
|
||||
insert into t1 values(4, repeat('-',12));
|
||||
insert into t1 values(5, repeat('.',12));
|
||||
insert into t2 select * from t1;
|
||||
insert into t3 select * from t1;
|
||||
commit work;
|
||||
|
||||
# Slow shutdown and restart to make sure ibuf merge is finished
|
||||
@@ -33,12 +35,14 @@ let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_fl
|
||||
|
||||
select space into @t1_space_id from information_schema.innodb_sys_tablespaces where name='test/t1';
|
||||
select space into @t2_space_id from information_schema.innodb_sys_tablespaces where name='test/t2';
|
||||
select space into @t3_space_id from information_schema.innodb_sys_tablespaces where name='test/t3';
|
||||
|
||||
begin;
|
||||
insert into t1 values (6, repeat('%', 400));
|
||||
insert into t2 values (6, repeat('%', 400));
|
||||
insert into t3 values (6, repeat('%', 400));
|
||||
|
||||
# Copy the t1.ibd, t2.ibd file
|
||||
# Copy the t1.ibd, t2.ibd, t3.ibd file
|
||||
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup_1;
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --skip-innodb-log-checkpoint-now --target-dir=$targetdir;
|
||||
@@ -54,8 +58,11 @@ set global innodb_fil_make_page_dirty_debug = @t1_space_id;
|
||||
set global innodb_saved_page_number_debug = 3;
|
||||
set global innodb_fil_make_page_dirty_debug = @t2_space_id;
|
||||
|
||||
set global innodb_saved_page_number_debug = 3;
|
||||
set global innodb_fil_make_page_dirty_debug = @t3_space_id;
|
||||
|
||||
set global innodb_buf_flush_list_now = 1;
|
||||
--let CLEANUP_IF_CHECKPOINT=drop table t1, t2, unexpected_checkpoint;
|
||||
--let CLEANUP_IF_CHECKPOINT=drop table t1, t2, t3, unexpected_checkpoint;
|
||||
--source ../../suite/innodb/include/no_checkpoint_end.inc
|
||||
# Corrupt the page 3 in t1.ibd, t2.ibd file
|
||||
perl;
|
||||
@@ -103,6 +110,15 @@ binmode FILE;
|
||||
sysseek(FILE, 3*$page_size, 0);
|
||||
print FILE chr(0) x ($ENV{'INNODB_PAGE_SIZE'});
|
||||
close FILE;
|
||||
|
||||
# Zero the complete page
|
||||
my $fname= "$ENV{'MYSQLD_DATADIR'}test/t3.ibd";
|
||||
open(FILE, "+<", $fname) or die;
|
||||
FILE->autoflush(1);
|
||||
binmode FILE;
|
||||
sysseek(FILE, 3*$page_size, 0);
|
||||
print FILE chr(0) x ($ENV{'INNODB_PAGE_SIZE'});
|
||||
close FILE;
|
||||
EOF
|
||||
|
||||
# Successful recover from doublewrite buffer
|
||||
@@ -114,8 +130,10 @@ let SEARCH_PATTERN=InnoDB: Recovered page \\[page id: space=[1-9]*, page number=
|
||||
|
||||
check table t1;
|
||||
check table t2;
|
||||
check table t3;
|
||||
select f1, f2 from t1;
|
||||
select f1, f2 from t2;
|
||||
select f1, f2 from t3;
|
||||
|
||||
SET GLOBAL innodb_fast_shutdown = 0;
|
||||
let $shutdown_timeout=;
|
||||
@@ -220,4 +238,4 @@ select * from t1;
|
||||
|
||||
--source ../../mariabackup/include/restart_and_restore.inc
|
||||
select * from t1;
|
||||
drop table t2, t1;
|
||||
drop table t3, t2, t1;
|
||||
|
Reference in New Issue
Block a user