Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11679

Remove redundant function fsp_header_get_crypt_offset()

Details

    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().

      Attachments

        Activity

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

          jplindst Jan Lindström (Inactive) added a comment - Ok to remove fsp_header_get_crypt_offset(), please consider offset returned by used method.

          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.

          marko Marko Mäkelä added a comment - 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.
          jplindst Jan Lindström (Inactive) added a comment - - edited

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

          jplindst Jan Lindström (Inactive) added a comment - - edited Ok to push, I did not like the need to modify returned offset, but your reasoning with MySQL 5.7 is good.

          People

            marko Marko Mäkelä
            marko Marko Mäkelä
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.