Debian Codegraph @

mysql-test/suite/innodb/r/dblwr_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 SESSION innodb_interpreter = 'init';
10 CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 BLOB) ENCRYPTION='Y';
11 START TRANSACTION;
12 INSERT INTO t1 VALUES(1, repeat('#',12));
13 INSERT INTO t1 VALUES(2, repeat('+',12));
14 INSERT INTO t1 VALUES(3, repeat('/',12));
15 COMMIT WORK;
16 SELECT space from INFORMATION_SCHEMA.INNODB_TABLESPACES
17 WHERE name = 'test/t1' INTO @space_id;
18 # Ensure that dirty pages of table t1 is flushed.
19 FLUSH TABLES t1 FOR EXPORT;
20 UNLOCK TABLES;
21 SET SESSION innodb_interpreter = 'find_tablespace_file_name test/t1';
22 SELECT @@session.innodb_interpreter_output INTO @space_file_name;
23 SET SESSION innodb_interpreter = 'find_tablespace_physical_page_size test/t1';
24 SELECT @@session.innodb_interpreter_output INTO @space_page_size;
25 START TRANSACTION;
26 INSERT INTO t1 VALUES(4, repeat('.',12));
27 SET SESSION innodb_interpreter = CONCAT('dblwr_force_crash ', @space_id, ' 0');
28 SET SESSION innodb_interpreter = CONCAT('make_page_dirty ', @space_id, ' 0');
29 ERROR HY000: Lost connection to MySQL server during query
30 # restart
31 Pattern "\[Note\] .* Restoring page \[page id: space=\d+, page number=0\] of datafile .* from the doublewrite buffer. Writing .*" found
32 CHECK TABLE t1;
33 Table Op Msg_type Msg_text
34 test.t1 check status OK
35 SELECT f1, f2 FROM t1;
36 f1 f2
37 1 ############
38 2 ++++++++++++
39 3 ////////////
40 DROP TABLE t1;
41 # Test End