| 1 |
# create bootstrap file |
| 2 |
# Stop the MTR default DB server |
| 3 |
# Run the bootstrap command with no keyring |
| 4 |
# Run the bootstrap command with keyring |
| 5 |
# Search for particular string of encryption metadata, should success since it's encrypted. |
| 6 |
Pattern "lCC" found |
| 7 |
# Start the DB server with undo log encryption disabled and keyring plugin loaded. It should success. |
| 8 |
INSTALL PLUGIN keyring_file SONAME 'keyring_file.so'; |
| 9 |
ERROR HY000: Function 'keyring_file' already exists |
| 10 |
SET GLOBAL innodb_undo_log_encrypt = ON; |
| 11 |
CREATE TABLE tab1(c1 INT, c2 VARCHAR(30)); |
| 12 |
START TRANSACTION; |
| 13 |
INSERT INTO tab1 VALUES (100,REPEAT('a',5)),(200,REPEAT('b',5)); |
| 14 |
SELECT * FROM tab1; |
| 15 |
c1 c2 |
| 16 |
100 aaaaa |
| 17 |
200 bbbbb |
| 18 |
COMMIT; |
| 19 |
SET GLOBAL innodb_undo_log_encrypt = OFF; |
| 20 |
START TRANSACTION; |
| 21 |
INSERT INTO tab1 VALUES (300,REPEAT('a',5)),(400,REPEAT('b',5)); |
| 22 |
COMMIT; |
| 23 |
SELECT * FROM tab1; |
| 24 |
c1 c2 |
| 25 |
100 aaaaa |
| 26 |
200 bbbbb |
| 27 |
300 aaaaa |
| 28 |
400 bbbbb |
| 29 |
UNINSTALL PLUGIN keyring_file; |
| 30 |
DROP TABLE tab1; |
| 31 |
Pattern "lCC" found |
| 32 |
Pattern "lCC" found |