[MDEV-18279] MLOG_FILE_WRITE_CRYPT_DATA fails to set the crypt_data->type for tablespace. Created: 2019-01-17  Updated: 2019-01-22  Resolved: 2019-01-17

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.4.2, 10.1.38, 10.2.22, 10.3.13

Type: Bug Priority: Major
Reporter: Thirunarayanan Balathandayuthapani Assignee: Thirunarayanan Balathandayuthapani
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-18183 Server startup fails while dropping g... Closed

 Description   

Problem is that MLOG_FILE_WRITE_CRYPT_DATA redo log fails to apply type for the crypt_data present in the space. While processing the double-write buffe
pages, page fails to decrypt because fil_space_t doesn't have type.

The following patch can able to repeat the issue:

diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
index e8391d9..8af0bfa 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
@@ -105,6 +105,18 @@ DROP TABLE t2;
 CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4;
 SHOW WARNINGS;
 
+--let datadir= `select @@datadir`
+--let $_server_id= `SELECT @@server_id`
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
+
+create table t1(f1 int not null, f2 int not null)engine=innodb encrypted=yes;
+insert into t1 values(1, 2), (2, 3), (4, 5), (5, 6), (7, 8);
+insert into t1 select * from t1;
+--source include/kill_mysqld.inc
+--source include/start_mysqld.inc
+select * from t1;
+drop table t1;
+

It gives the warning messages like:

10.2 f3e9d9a6e6b2614bf5d57ccf9434c980e4a90424

2019-01-17 11:54:52 139736940791616 [Warning] InnoDB: A doublewrite copy of page [page id: space=0, page number=329] is corrupted.
2019-01-17 11:54:52 139736940791616 [Warning] InnoDB: A doublewrite copy of page [page id: space=0, page number=337] is corrupted.
2019-01-17 11:54:52 139736940791616 [Warning] InnoDB: A doublewrite copy of page [page id: space=0, page number=446] is corrupted.
2019-01-17 11:54:52 139736940791616 [Warning] InnoDB: A doublewrite copy of page [page id: space=0, page number=366] is corrupted.
2019-01-17 11:54:52 139736940791616 [Warning] InnoDB: A doublewrite copy of page [page id: space=0, page number=450] is corrupted.
2019-01-17 11:54:52 139736940791616 [Warning] InnoDB: A doublewrite copy of page [page id: space=0, page number=451] is corrupted.
2019-01-17 11:54:52 139736940791616 [Warning] InnoDB: A doublewrite copy of page [page id: space=0, page number=375] is corrupted.
2019-01-17 11:54:52 139736940791616 [Warning] InnoDB: A doublewrite copy of page [page id: space=0, page number=384] is corrupted.
2019-01-17 11:54:52 139736940791616 [Warning] InnoDB: A doublewrite copy of page [page id: space=0, page number=393] is corrupted.


Generated at Thu Feb 08 08:42:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.