Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.1.26, 10.2.7
-
None
-
Red Hat Enterprise Linux Server 7.3
Server version: 10.2.7-MariaDB-log MariaDB Server
Description
After upgrading from an older 5.5 release and implementing Data At Rest Encryption, then proceeding to convert a lot of myisam tables over to innodb, the following errors are now reported when starting the mariadb service.
[ERROR] InnoDB: The page [page id: space=0, page number=7] in file './ibdata1' cannot be decrypted.
[Note] InnoDB: However key management plugin or used key_version 1 is not found or used encryption algorithm or method does not match.
[ERROR] [FATAL] InnoDB: Aborting because of a corrupt database page.
(See attached error_output.txt for full startup log detail)
The entire upgrade process did work smoothly, until the point I restarted the mariadb service.
The upgrade process went through the following stages.
1: Update mariadb via yum using the mariadb repo.
2: Rework config files due to path changes and start mariadb
3: Stop database, add in encryption configuration and start again.
4: Run sql query to convert tables from myisam to innodb.
# mysql dev_cms -e "show table status where Engine='MyISAM';" | awk 'NR>1
{print "ALTER TABLE `"$1"` ENGINE = InnoDB;"}' |mysql dev_cms
5: Test and verify that encryption is working.
6: Stop and restart mariadb - Fault occurs on startup.
I've referenced two other issues which appear to be the same problem, however they're both listed and fixed in the 10.1 branch not 10.2
I don't have, but can probably generate more data if required.
Attachments
Issue Links
- causes
-
MDEV-14701 install_db shows corruption for rest encryption with innodb_data_file_path=ibdata1:3M
-
- Closed
-
- duplicates
-
MDEV-13093 Leak of Datafile::m_crypt_info on shutdown after failed startup
-
- Closed
-
-
MDEV-13488 InnoDB writes CRYPT_INFO even though encryption is not enabled
-
- Closed
-
- relates to
-
MDEV-10977 [ERROR] InnoDB: Block in space_id 0 in file ibdata1 encrypted.
-
- Closed
-
-
MDEV-13181 encryption.innodb-first-page-read sporadically fails in buildbot with signal 8
-
- Closed
-
Hi dcorp, thank you for your feedback. Because our QA engineer elenst repeated the problem with a freshly created 5.5 database, we can conclude that the impact is much higher than I initially thought. We can proceed without any copy of your data.
SQL dump and import into MySQL 5.5 or later would properly initialize all InnoDB data pages. If all previous upgrades were made in place, using original binary files potentially dating back as far as MySQL 3.23.49, then there could be problems due to previously unused but written-as-garbage bytes that have been repurposed in later versions of InnoDB. I think that we can rule it out in this case. InnoDB stopped writing uninitialized data to files in some version of the InnoDB Plugin for MySQL 5.1. All 5.5 versions should be safe in this respect.