mirror of
https://github.com/MariaDB/server.git
synced 2025-05-13 01:01:44 +03:00
Disable change buffering, so that some data that was previously written to the encrypted redo log will not end up being copied to the unencrypted redo log due to change buffer merge.
67 lines
2.2 KiB
Plaintext
67 lines
2.2 KiB
Plaintext
#
|
|
# MDEV-9011: Redo log encryption does not work
|
|
#
|
|
#
|
|
# MDEV-9422 Encrypted redo log checksum errors
|
|
# on restart after killing busy server instance
|
|
#
|
|
SET GLOBAL innodb_log_checksums=0;
|
|
Warnings:
|
|
Warning 138 innodb_encrypt_log implies innodb_log_checksums
|
|
SELECT @@global.innodb_log_checksums;
|
|
@@global.innodb_log_checksums
|
|
1
|
|
CREATE TABLE t0 (
|
|
pk bigint auto_increment,
|
|
col_int int,
|
|
col_int_key int,
|
|
col_char char(12),
|
|
col_char_key char(12),
|
|
primary key (pk),
|
|
key (col_int_key),
|
|
key (col_char_key)
|
|
) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
|
|
CREATE TEMPORARY TABLE t LIKE t0;
|
|
INSERT INTO t VALUES
|
|
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'),
|
|
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament');
|
|
SET GLOBAL innodb_change_buffering=none;
|
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
|
INSERT INTO t0
|
|
SELECT NULL, t1.col_int, t1.col_int_key, t1.col_char, t1.col_char_key
|
|
FROM t t1, t t2, t t3, t t4, t t5;
|
|
# Kill the server
|
|
# ibdata1 expecting NOT FOUND
|
|
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ibdata1
|
|
# t0.ibd expecting NOT FOUND
|
|
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in t0.ibd
|
|
# ib_logfile0 expecting NOT FOUND
|
|
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0
|
|
# ib_logfile1 expecting NOT FOUND
|
|
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile1
|
|
# Restart without redo log encryption
|
|
SELECT COUNT(*) FROM t0;
|
|
COUNT(*)
|
|
1024
|
|
CHECK TABLE t0;
|
|
Table Op Msg_type Msg_text
|
|
test.t0 check status OK
|
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
|
INSERT INTO t0 VALUES(NULL, 5, 5, 'public', 'gossip');
|
|
# Kill the server
|
|
# ib_logfile0 expecting NOT FOUND
|
|
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0
|
|
# ib_logfile0 expecting FOUND
|
|
FOUND 3 /public|gossip/ in ib_logfile0
|
|
# ibdata1 expecting NOT FOUND
|
|
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in ibdata1
|
|
# t0.ibd expecting NOT FOUND
|
|
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in t0.ibd
|
|
SELECT COUNT(*) FROM t0;
|
|
COUNT(*)
|
|
1025
|
|
CHECK TABLE t0;
|
|
Table Op Msg_type Msg_text
|
|
test.t0 check status OK
|
|
DROP TABLE t0;
|