[MDEV-11679] Remove redundant function fsp_header_get_crypt_offset() Created: 2016-12-28  Updated: 2016-12-29  Resolved: 2016-12-29

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Fix Version/s: 10.2.4

Type: Task Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: encryption


 Description   

When Oracle implemented encryption in MySQL 5.7, it created a function fsp_header_get_encryption_offset() that returns the same result as the MariaDB function fsp_header_get_crypt_offset(), but with an arithmetic formula instead of iteration.

Let us remove the function fsp_header_get_crypt_offset().



 Comments   
Comment by Jan Lindström (Inactive) [ 2016-12-29 ]

Ok to remove fsp_header_get_crypt_offset(), please consider offset returned by used method.

Comment by Marko Mäkelä [ 2016-12-29 ]

Thank you for the review.
I am a bit uncertain what you mean by the comment.
To avoid confusion and reduce future trouble when merging any code from MySQL, I would like to use the same function signature as MySQL 5.7.
The removed function fsp_header_get_crypt_offset() would return a different offset (differing by the page header size, or 38 bytes), and it would calculate the size of the available area (max_size). Only two callers of the function needed this size. They can calculate it directly with a simple formula.

Comment by Jan Lindström (Inactive) [ 2016-12-29 ]

Ok to push, I did not like the need to modify returned offset, but your reasoning with MySQL 5.7 is good.

Generated at Thu Feb 08 07:51:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.