mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
4c50120d14
Regretfully, the parameter innodb_log_checksums was introduced in MySQL 5.7.9 (the first GA release of that series) by mysql/mysql-server@af0acedd88 which partly replaced a parameter that had been introduced in 5.7.8 mysql/mysql-server@22ba38218e as innodb_log_checksum_algorithm. Given that the CRC-32C operations are accelerated on many processor implementations (AMD64 with SSE4.2; since MDEV-22669 also on IA-32 with SSE4.2, POWER 8 and later, ARMv8 with some extensions) and by lookup tables when only generic SISD instructions are available, there should be no valid reason to disable checksums. In MariaDB 10.5.2, as a preparation for MDEV-12353, MDEV-19543 deprecated and ignored the parameter innodb_log_checksums altogether. This should imply that after a clean shutdown with innodb_log_checksums=OFF one cannot upgrade to MariaDB Server 10.5 at all. Due to these problems, let us deprecate the parameter innodb_log_checksums and honor it only during server startup. The command SET GLOBAL innodb_log_checksums will always set the parameter to ON.
66 lines
2.2 KiB
Text
66 lines
2.2 KiB
Text
#
|
|
# 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_log_checksums is deprecated and has no effect outside recovery
|
|
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;
|
|
Warnings:
|
|
Warning 1478 Ignoring encryption parameter during temporary table creation.
|
|
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
|
|
# 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 1 /(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;
|