[MDEV-26747] improve corruption check for encrypted tables on ALTER IMPORT Created: 2021-10-02  Updated: 2021-11-19  Resolved: 2021-11-17

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Encryption, Storage Engine - InnoDB
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6

Type: Bug Priority: Major
Reporter: Eugene Kosov (Inactive) Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

https://github.com/MariaDB/server/blob/d5a15f04f4ab0738b0a5f993b208bcfaad522fd4/storage/innobase/fil/fil0crypt.cc#L692

When some page in an encrypted table will be corrupted to have ENCRYPTION_KEY_NOT_ENCRYPTED key the server won't call it a corruption.

At least a test case with such specific corruption should be added and probably code need to be fixed too. Namely, fil_space_decrypt() should return dberr_t instead of bool.



 Comments   
Comment by Marko Mäkelä [ 2021-11-03 ]

Thank you, this looks mostly good, except that I suspect that this might cause a server crash when importing a suitably corrupted encrypted tablespace. Also, please fix the compilation failure on the 10.4 branch.

Generated at Thu Feb 08 09:47:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.