Debian Codegraph @

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

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