Debian Codegraph @

mysql-test/suite/innodb/r/dblwr_zlib_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 CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 BLOB) COMPRESSION='zlib' ENCRYPTION='Y';
12 START TRANSACTION;
13 INSERT INTO t1 VALUES(1, repeat('#',12));
14 INSERT INTO t1 VALUES(2, repeat('+',12));
15 INSERT INTO t1 VALUES(3, repeat('/',12));
16 INSERT INTO t1 VALUES(4, repeat('-',12));
17 INSERT INTO t1 VALUES(5, repeat('.',12));
18 COMMIT WORK;
19 # Wait for purge to complete
20 # Ensure that dirty pages of table t1 is flushed.
21 FLUSH TABLES t1 FOR EXPORT;
22 UNLOCK TABLES;
23 SET GLOBAL innodb_master_thread_disabled_debug=1;
24 SET GLOBAL innodb_checkpoint_disabled = 1;
25 BEGIN;
26 INSERT INTO t1 VALUES (6, repeat('%', 12));
27 SET SESSION innodb_interpreter = 'init';
28 SET SESSION innodb_interpreter = 'buf_flush_sync_all_buf_pools';
29 SET SESSION innodb_interpreter = 'open_table test/t1';
30 SET SESSION innodb_interpreter = 'find_space_id test/t1';
31 SELECT @@session.innodb_interpreter_output INTO @space_id;
32 SET @cmd = CONCAT('make_page_dirty ', @space_id, ' 0');
33 SET SESSION innodb_interpreter = @cmd;
34 SET SESSION innodb_interpreter = 'corrupt_ondisk_page0 test/t1';
35 SET SESSION innodb_interpreter = 'destroy';
36 # Kill and restart
37 SET SESSION innodb_interpreter = 'init';
38 SET SESSION innodb_interpreter = 'print_dblwr_has_encrypted_pages';
39 SET SESSION innodb_interpreter = 'destroy';
40 Pattern "Double write file has encrypted pages" found
41 Pattern "\[Note\] .* Restoring page \[page id: space=\d+, page number=0\] of datafile .* from the doublewrite buffer. Writing .*" found
42 CHECK TABLE t1;
43 Table Op Msg_type Msg_text
44 test.t1 check status OK
45 SELECT f1, f2 FROM t1;
46 f1 f2
47 1 ############
48 2 ++++++++++++
49 3 ////////////
50 4 ------------
51 5 ............
52 DROP TABLE t1;
53 # Test End