Debian Codegraph @

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

raw
1 #
2 # WL#13775 - InnoDB: Encrypt DBLWR files
3 #
4 #
5 # Test Begin: Test if recovery works if first page of user
6 # tablespace is corrupted. Valid copy of that page is there
7 # in DBLWR file.
8 #
9 SET GLOBAL innodb_fast_shutdown = 0;
10 # restart
11 SET SESSION innodb_interpreter = 'init';
12 SET SESSION innodb_interpreter = 'buf_flush_sync_all_buf_pools';
13 CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 BLOB) COMPRESSION='lz4' ENCRYPTION='Y';
14 SHOW CREATE TABLE t1;
15 Table Create Table
16 t1 CREATE TABLE `t1` (
17 `f1` int NOT NULL,
18 `f2` blob,
19 PRIMARY KEY (`f1`)
20 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMPRESSION='lz4' ENCRYPTION='Y'
21 START TRANSACTION;
22 INSERT INTO t1 VALUES(1, repeat('#',12));
23 INSERT INTO t1 VALUES(2, repeat('+',12));
24 INSERT INTO t1 VALUES(3, repeat('/',12));
25 INSERT INTO t1 VALUES(4, repeat('-',12));
26 INSERT INTO t1 VALUES(5, repeat('.',12));
27 COMMIT WORK;
28 # Wait for purge to complete
29 # Ensure that dirty pages of table t1 is flushed.
30 FLUSH TABLES t1 FOR EXPORT;
31 UNLOCK TABLES;
32 SET GLOBAL innodb_master_thread_disabled_debug=1;
33 SET GLOBAL innodb_checkpoint_disabled = 1;
34 BEGIN;
35 INSERT INTO t1 VALUES (6, repeat('%', 12));
36 SET SESSION innodb_interpreter = 'buf_flush_sync_all_buf_pools';
37 SET SESSION innodb_interpreter = 'open_table test/t1';
38 SET SESSION innodb_interpreter = 'find_space_id test/t1';
39 SELECT @@session.innodb_interpreter_output INTO @space_id;
40 SET @cmd = CONCAT('make_page_dirty ', @space_id, ' 0');
41 SET SESSION innodb_interpreter = @cmd;
42 SET SESSION innodb_interpreter = 'corrupt_ondisk_page0 test/t1';
43 SET SESSION innodb_interpreter = 'destroy';
44 # Kill and restart
45 SET SESSION innodb_interpreter = 'init';
46 SET SESSION innodb_interpreter = 'print_dblwr_has_encrypted_pages';
47 SET SESSION innodb_interpreter = 'destroy';
48 Pattern "Double write file has encrypted pages" found
49 Pattern "\[Note\] .* Restoring page \[page id: space=\d+, page number=0\] of datafile .* from the doublewrite buffer. Writing .*" found
50 CHECK TABLE t1;
51 Table Op Msg_type Msg_text
52 test.t1 check status OK
53 SELECT f1, f2 FROM t1;
54 f1 f2
55 1 ############
56 2 ++++++++++++
57 3 ////////////
58 4 ------------
59 5 ............
60 DROP TABLE t1;
61 # Test End