Debian Codegraph @

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

raw
1 #########
2 # SETUP #
3 #########
4 #########################################################################
5 # RESTART 1 : WITH KEYRING PLUGIN
6 #########################################################################
7 #-------------------------- TEST 1 -------------------------------------#
8 CREATE TABLESPACE encrypt_ts ADD DATAFILE 'encrypt_ts.ibd' ENGINE=InnoDB ENCRYPTION="N";
9 CREATE TABLE t1(c1 char(100)) ENGINE=InnoDB TABLESPACE encrypt_ts;
10 set global innodb_buf_flush_list_now = 1;
11 SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts';
12 NAME ENCRYPTION
13 encrypt_ts N
14 SELECT * FROM t1 LIMIT 10;
15 c1
16 SOME VALUES
17 SOME VALUES
18 SOME VALUES
19 SOME VALUES
20 SOME VALUES
21 SOME VALUES
22 SOME VALUES
23 SOME VALUES
24 SOME VALUES
25 SOME VALUES
26 # Set Encryption process to crash just after making DDL Entry
27 SET SESSION debug= '+d,alter_encrypt_tablespace_crash_after_ddl_entry';
28 # Encrypt the tablespace. It will cause crash.
29 ALTER TABLESPACE encrypt_ts ENCRYPTION='Y';
30 #########################################################################
31 # RESTART 2 : WITH KEYRING PLUGIN after crash
32 #########################################################################
33 # INJECT error TOO_MANY_CONCURRENT_TXNS in startup location DDL_Log_remove_inject_startup_error_1.
34 # It will cause FATAL error and server abort.
35 # Search the failure pattern in error log
36 Pattern "ENCRYPTION for tablespace encrypt_ts:[0-9]+ could not be done successfully" found
37 DROP TABLE t1;
38 DROP TABLESPACE encrypt_ts;
39 #########################################################################
40 # RESTART 3 : normally
41 #########################################################################
42 #-------------------------- TEST 2 -------------------------------------#
43 CREATE TABLESPACE encrypt_ts ADD DATAFILE 'encrypt_ts.ibd' ENGINE=InnoDB ENCRYPTION="N";
44 CREATE TABLE t1(c1 char(100)) ENGINE=InnoDB TABLESPACE encrypt_ts;
45 set global innodb_buf_flush_list_now = 1;
46 SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts';
47 NAME ENCRYPTION
48 encrypt_ts N
49 SELECT * FROM t1 LIMIT 10;
50 c1
51 SOME VALUES
52 SOME VALUES
53 SOME VALUES
54 SOME VALUES
55 SOME VALUES
56 SOME VALUES
57 SOME VALUES
58 SOME VALUES
59 SOME VALUES
60 SOME VALUES
61 # Set Encryption process to crash just after making DDL Entry
62 SET SESSION debug= '+d,alter_encrypt_tablespace_crash_after_ddl_entry';
63 # Encrypt the tablespace. It will cause crash.
64 ALTER TABLESPACE encrypt_ts ENCRYPTION='Y';
65 #########################################################################
66 # RESTART 4 : WITH KEYRING PLUGIN after crash
67 #########################################################################
68 # INJECT error TOO_MANY_CONCURRENT_TXNS in startup location DDL_Log_remove_inject_startup_error_2.
69 # It will cause FATAL error and server abort.
70 # Search the failure pattern in error log
71 Pattern "\[FATAL\] Error in DDL Log recovery during Post-Recovery processing." found
72 #########################################################################
73 # RESTART 4 : normally
74 #########################################################################
75 DROP TABLE t1;
76 DROP TABLESPACE encrypt_ts;
77 ###########
78 # Cleanup #
79 ###########
80 #########################################################################
81 # RESTART 5 : final
82 #########################################################################