1# create bootstrap file 2# Stop the MTR default DB server 3# Run the bootstrap command of datadir1 4# Start the DB server with datadir1 5SELECT @@global.innodb_redo_log_encrypt; 6@@global.innodb_redo_log_encrypt 7KEYRING_KEY 8USE test; 9CREATE TABLE tab1(c1 INT, c2 VARCHAR(30)); 10INSERT INTO tab1 VALUES(1, 'Test consistency undo*'); 11SELECT * FROM tab1; 12c1 c2 131 Test consistency undo* 14CREATE TABLE tab2(c1 INT, c2 VARCHAR(30)) ENCRYPTION="Y"; 15INSERT INTO tab2 VALUES(1, 'Test consistency undo*'); 16SELECT * FROM tab2; 17c1 c2 181 Test consistency undo* 19DROP TABLE tab1,tab2; 20# restart: 21# Stop the MTR default DB server 22# Run the bootstrap command of datadir2, it should fail since the keyring is not loaded. 23# Run the bootstrap command of datadir2 24# Start the DB server with datadir2 25SELECT @@global.innodb_redo_log_encrypt; 26@@global.innodb_redo_log_encrypt 27KEYRING_KEY 28USE test; 29CREATE TABLE tab1(c1 INT, c2 VARCHAR(30)); 30INSERT INTO tab1 VALUES(1, 'Test consistency undo*'); 31SELECT * FROM tab1; 32c1 c2 331 Test consistency undo* 34CREATE TABLE tab2(c1 INT, c2 VARCHAR(30)) ENCRYPTION="Y"; 35INSERT INTO tab2 VALUES(1, 'Test consistency undo*'); 36SELECT * FROM tab2; 37c1 c2 381 Test consistency undo* 39DROP TABLE tab1,tab2; 40# restart: 41# Stop the MTR default DB server 42# Run the bootstrap command of datadir3 43# Start the DB server with datadir3 and keyring loaded. 44SELECT @@global.innodb_redo_log_encrypt; 45@@global.innodb_redo_log_encrypt 46OFF 47USE test; 48CREATE TABLE tab1(c1 INT, c2 VARCHAR(30)); 49INSERT INTO tab1 VALUES(1, 'Test consistency undo*'); 50SELECT * FROM tab1; 51c1 c2 521 Test consistency undo* 53CREATE TABLE tab2(c1 INT, c2 VARCHAR(30)) ENCRYPTION="Y"; 54DROP TABLE tab1; 55# restart: 56