| 1 |
# |
| 2 |
# MDEV-9011: Redo log encryption does not work |
| 3 |
# |
| 4 |
# |
| 5 |
# MDEV-9422 Encrypted redo log checksum errors |
| 6 |
# on restart after killing busy server instance |
| 7 |
# |
| 8 |
CREATE TABLE t0 ( |
| 9 |
pk bigint auto_increment, |
| 10 |
col_int int, |
| 11 |
col_int_key int, |
| 12 |
col_char char(12), |
| 13 |
col_char_key char(12), |
| 14 |
primary key (pk), |
| 15 |
key (col_int_key), |
| 16 |
key (col_char_key) |
| 17 |
) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1; |
| 18 |
CREATE TEMPORARY TABLE t LIKE t0; |
| 19 |
Warnings: |
| 20 |
Warning 1478 Ignoring encryption parameter during temporary table creation. |
| 21 |
INSERT INTO t VALUES |
| 22 |
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'), |
| 23 |
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament'); |
| 24 |
SET GLOBAL innodb_flush_log_at_trx_commit=1; |
| 25 |
INSERT INTO t0 |
| 26 |
SELECT NULL, t1.col_int, t1.col_int_key, t1.col_char, t1.col_char_key |
| 27 |
FROM t t1, t t2, t t3, t t4, t t5; |
| 28 |
# Kill the server |
| 29 |
# ibdata1 expecting NOT FOUND |
| 30 |
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ibdata1 |
| 31 |
# t0.ibd expecting NOT FOUND |
| 32 |
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in t0.ibd |
| 33 |
# ib_logfile0 expecting NOT FOUND |
| 34 |
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0 |
| 35 |
# Restart without redo log encryption |
| 36 |
# restart: --skip-innodb-encrypt-log |
| 37 |
SELECT COUNT(*) FROM t0; |
| 38 |
COUNT(*) |
| 39 |
1024 |
| 40 |
CHECK TABLE t0; |
| 41 |
Table Op Msg_type Msg_text |
| 42 |
test.t0 check status OK |
| 43 |
SET GLOBAL innodb_flush_log_at_trx_commit=1; |
| 44 |
INSERT INTO t0 VALUES(NULL, 5, 5, 'public', 'gossip'); |
| 45 |
# Kill the server |
| 46 |
# ib_logfile0 expecting NOT FOUND |
| 47 |
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0 |
| 48 |
# ib_logfile0 expecting FOUND |
| 49 |
FOUND 1 /(public|gossip).*/ in ib_logfile0 |
| 50 |
# ibdata1 expecting NOT FOUND |
| 51 |
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in ibdata1 |
| 52 |
# t0.ibd expecting NOT FOUND |
| 53 |
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in t0.ibd |
| 54 |
# restart |
| 55 |
SELECT COUNT(*) FROM t0; |
| 56 |
COUNT(*) |
| 57 |
1025 |
| 58 |
CHECK TABLE t0; |
| 59 |
Table Op Msg_type Msg_text |
| 60 |
test.t0 check status OK |
| 61 |
DROP TABLE t0; |