Debian Codegraph @

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

raw
1 #
2 # WL#13775 - InnoDB: Encrypt DBLWR files
3 #
4 # Test scenario:
5 # Check if the DBLWR recovery works correctly for a page
6 # that is compressed and encrypted.
7 create table t1 (f1 int primary key, f2 blob) COMPRESSION='lz4' ENCRYPTION='Y';
8 START TRANSACTION;
9 INSERT INTO t1 VALUES(1, repeat('#',12));
10 INSERT INTO t1 VALUES(2, repeat('+',12));
11 INSERT INTO t1 VALUES(3, repeat('/',12));
12 INSERT INTO t1 VALUES(4, repeat('-',12));
13 INSERT INTO t1 VALUES(5, repeat('.',12));
14 COMMIT WORK;
15 # Ensure that dirty pages of table t1 is flushed.
16 FLUSH TABLES t1 FOR EXPORT;
17 UNLOCK TABLES;
18 SET SESSION innodb_interpreter = 'init';
19 SET SESSION innodb_interpreter = 'open_table test/t1';
20 # Identify the space_id of the given table.
21 SET SESSION innodb_interpreter = 'find_space_id test/t1';
22 SELECT @@session.innodb_interpreter_output INTO @space_id;
23 # Find the root page number of the given table.
24 SET SESSION innodb_interpreter = 'find_root_page_no test/t1';
25 SELECT @@session.innodb_interpreter_output INTO @page_no;
26 # Find the on-disk page type of the given page.
27 SET @cmd = CONCAT('find_ondisk_page_type ', @space_id, ' ', @page_no);
28 SET SESSION innodb_interpreter = @cmd;
29 SELECT @@session.innodb_interpreter_output INTO @page_type;
30 SELECT @page_type;
31 @page_type
32 FIL_PAGE_COMPRESSED_AND_ENCRYPTED
33 SET SESSION innodb_interpreter = 'corrupt_ondisk_root_page test/t1';
34 SET SESSION innodb_interpreter = 'destroy';
35 # Kill and restart
36 set global innodb_interpreter = 'init';
37 set global innodb_interpreter = 'print_dblwr_has_encrypted_pages';
38 set global innodb_interpreter = 'destroy';
39 Pattern "Double write file has encrypted pages" found
40 Pattern "\[Note\] \[MY-\d+\] \[InnoDB\] Recovered page \[page id: space=\d+, page number=\d+\] from the doublewrite buffer" found
41 CHECK TABLE t1;
42 Table Op Msg_type Msg_text
43 test.t1 check status OK
44 SELECT f1, f2 FROM t1;
45 f1 f2
46 1 ############
47 2 ++++++++++++
48 3 ////////////
49 4 ------------
50 5 ............
51 DROP TABLE t1;
52 # Test End