| 1 |
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"); |
| 2 |
call mtr.add_suppression("InnoDB: Unable to apply log to corrupted page "); |
| 3 |
call mtr.add_suppression("InnoDB: Plugin initialization aborted"); |
| 4 |
call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); |
| 5 |
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); |
| 6 |
create table t1 (f1 int primary key, f2 blob)page_compressed=1 engine=innodb encrypted=yes stats_persistent=0; |
| 7 |
create table t2(f1 int primary key, f2 blob)engine=innodb encrypted=yes stats_persistent=0; |
| 8 |
create table t3(f1 int primary key, f2 blob)page_compressed=1 engine=innodb encrypted=no stats_persistent=0; |
| 9 |
start transaction; |
| 10 |
insert into t1 values(1, repeat('#',12)); |
| 11 |
insert into t1 values(2, repeat('+',12)); |
| 12 |
insert into t1 values(3, repeat('/',12)); |
| 13 |
insert into t1 values(4, repeat('-',12)); |
| 14 |
insert into t1 values(5, repeat('.',12)); |
| 15 |
insert into t2 select * from t1; |
| 16 |
insert into t3 select * from t1; |
| 17 |
commit work; |
| 18 |
SET GLOBAL innodb_fast_shutdown = 0; |
| 19 |
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0 |
| 20 |
select space into @t1_space_id from information_schema.innodb_sys_tablespaces where name='test/t1'; |
| 21 |
select space into @t2_space_id from information_schema.innodb_sys_tablespaces where name='test/t2'; |
| 22 |
select space into @t3_space_id from information_schema.innodb_sys_tablespaces where name='test/t3'; |
| 23 |
begin; |
| 24 |
insert into t1 values (6, repeat('%', 400)); |
| 25 |
insert into t2 values (6, repeat('%', 400)); |
| 26 |
insert into t3 values (6, repeat('%', 400)); |
| 27 |
# xtrabackup prepare |
| 28 |
set global innodb_saved_page_number_debug = 3; |
| 29 |
set global innodb_fil_make_page_dirty_debug = @t1_space_id; |
| 30 |
set global innodb_saved_page_number_debug = 3; |
| 31 |
set global innodb_fil_make_page_dirty_debug = @t2_space_id; |
| 32 |
set global innodb_saved_page_number_debug = 3; |
| 33 |
set global innodb_fil_make_page_dirty_debug = @t3_space_id; |
| 34 |
set global innodb_buf_flush_list_now = 1; |
| 35 |
# Kill the server |
| 36 |
# restart |
| 37 |
FOUND 3 /InnoDB: Recovered page \[page id: space=[1-9][0-9]*, page number=3\]/ in mysqld.1.err |
| 38 |
check table t1; |
| 39 |
Table Op Msg_type Msg_text |
| 40 |
test.t1 check status OK |
| 41 |
check table t2; |
| 42 |
Table Op Msg_type Msg_text |
| 43 |
test.t2 check status OK |
| 44 |
check table t3; |
| 45 |
Table Op Msg_type Msg_text |
| 46 |
test.t3 check status OK |
| 47 |
select f1, f2 from t1; |
| 48 |
f1 f2 |
| 49 |
1 ############ |
| 50 |
2 ++++++++++++ |
| 51 |
3 //////////// |
| 52 |
4 ------------ |
| 53 |
5 ............ |
| 54 |
select f1, f2 from t2; |
| 55 |
f1 f2 |
| 56 |
1 ############ |
| 57 |
2 ++++++++++++ |
| 58 |
3 //////////// |
| 59 |
4 ------------ |
| 60 |
5 ............ |
| 61 |
select f1, f2 from t3; |
| 62 |
f1 f2 |
| 63 |
1 ############ |
| 64 |
2 ++++++++++++ |
| 65 |
3 //////////// |
| 66 |
4 ------------ |
| 67 |
5 ............ |
| 68 |
SET GLOBAL innodb_fast_shutdown = 0; |
| 69 |
# shutdown server |
| 70 |
# remove datadir |
| 71 |
# xtrabackup move back |
| 72 |
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0 |
| 73 |
select space into @t1_space_id from information_schema.innodb_sys_tablespaces where name='test/t1'; |
| 74 |
begin; |
| 75 |
insert into t1 values (6, repeat('%', 400)); |
| 76 |
set global innodb_saved_page_number_debug = 3; |
| 77 |
set global innodb_fil_make_page_dirty_debug = @t1_space_id; |
| 78 |
set global innodb_buf_flush_list_now = 1; |
| 79 |
# Kill the server |
| 80 |
# Corrupt the page 3 in t1.ibd file |
| 81 |
# Assign the maximum value to lsn in doublewrite buffer page |
| 82 |
# restart |
| 83 |
FOUND 1 /InnoDB: Encrypted page \[page id: space=[1-9]*, page number=3\] in file .*test.t1.ibd looks corrupted/ in mysqld.1.err |
| 84 |
select * from t1; |
| 85 |
ERROR 42000: Unknown storage engine 'InnoDB' |
| 86 |
# shutdown server |
| 87 |
# remove datadir |
| 88 |
# xtrabackup move back |
| 89 |
# restart |
| 90 |
select * from t1; |
| 91 |
f1 f2 |
| 92 |
1 ############ |
| 93 |
2 ++++++++++++ |
| 94 |
3 //////////// |
| 95 |
4 ------------ |
| 96 |
5 ............ |
| 97 |
drop table t3, t2, t1; |