Debian Codegraph @

mysql-test/suite/innodb/r/dblwr_recover_zeroes.result

raw
1 #
2 # WL#13775 - InnoDB: Encrypt DBLWR files
3 #
4 #
5 # Test Begin: Test if recovery works if root page of user
6 # table is full of zeroes. Valid copy of that page is there
7 # in DBLWR file.
8 #
9 CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 BLOB) ENCRYPTION='Y';
10 START TRANSACTION;
11 INSERT INTO t1 VALUES(1, repeat('#',12));
12 INSERT INTO t1 VALUES(2, repeat('+',12));
13 INSERT INTO t1 VALUES(3, repeat('/',12));
14 INSERT INTO t1 VALUES(4, repeat('-',12));
15 INSERT INTO t1 VALUES(5, repeat('.',12));
16 COMMIT WORK;
17 # Wait for purge to complete
18 # Ensure that dirty pages of table t1 is flushed.
19 FLUSH TABLES t1 FOR EXPORT;
20 UNLOCK TABLES;
21 SET GLOBAL innodb_master_thread_disabled_debug=1;
22 SET GLOBAL innodb_checkpoint_disabled=1;
23 START TRANSACTION;
24 INSERT INTO t1 VALUES(6, repeat('.',12));
25 SET SESSION innodb_interpreter = 'init';
26 SET SESSION innodb_interpreter = 'open_table test/t1';
27 # Identify the space_id of the given table.
28 SET SESSION innodb_interpreter = 'find_space_id test/t1';
29 SELECT @@session.innodb_interpreter_output INTO @space_id;
30 # Find the root page number of the given table.
31 SET SESSION innodb_interpreter = 'find_root_page_no test/t1';
32 SELECT @@session.innodb_interpreter_output INTO @page_no;
33 # Find the on-disk page type of the given page.
34 SET @cmd = CONCAT('find_ondisk_page_type ', @space_id, ' ', @page_no);
35 SET SESSION innodb_interpreter = @cmd;
36 SELECT @@session.innodb_interpreter_output INTO @page_type;
37 SELECT @page_type;
38 @page_type
39 FIL_PAGE_ENCRYPTED
40 SET SESSION innodb_interpreter = 'find_tablespace_file_name test/t1';
41 SELECT @@session.innodb_interpreter_output INTO @space_file_name;
42 SET SESSION innodb_interpreter = 'find_tablespace_physical_page_size test/t1';
43 SELECT @@session.innodb_interpreter_output INTO @space_page_size;
44 SET SESSION innodb_interpreter = 'destroy';
45 # Kill the server
46 # Corrupt the root page of table t1 in the user tablespace.
47 # restart
48 SET SESSION innodb_interpreter = 'init';
49 SET SESSION innodb_interpreter = 'print_dblwr_has_encrypted_pages';
50 SET SESSION innodb_interpreter = 'destroy';
51 Pattern "Double write file has encrypted pages" found
52 Pattern "\[Note\] \[MY-\d+\] \[InnoDB\] Recovered page \[page id: space=\d+, page number=\d+\] from the doublewrite buffer" found
53 CHECK TABLE t1;
54 Table Op Msg_type Msg_text
55 test.t1 check status OK
56 SELECT f1, f2 FROM t1;
57 f1 f2
58 1 ############
59 2 ++++++++++++
60 3 ////////////
61 4 ------------
62 5 ............
63 DROP TABLE t1;
64 # Test End