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

Allow packing addon fields even if they don't honour max_length_for_sort_data

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5
    • 10.5.2
    • Optimizer
    • None

    Description

      When we pick the strategy of using addon fields while doing filesort, we try to check if one can pack the addon fields or not.
      This is done inside the function try_to_pack_addons()
      Inside this function, we have

        const uint sz= Addon_fields::size_of_length_field;
        if (rec_length + sz > max_length_for_sort_data)
          return;
      

      This means if the number of bytes becomes greater than max_length_for_sort_data by adding the size of length field for
      addons, then we should not pack.
      I think we can easily lift this limitation because it would be beneficial to pack even in such cases, so if the addon fields are picked (they already honour the max_length_for_sort_data in the function filesort_uses_addons()) then we should try to pack them in such cases.

      This issue was found during the performance testing for packed sort keys MDEV-21580

      Attachments

        Issue Links

          Activity

            People

              varun Varun Gupta (Inactive)
              varun Varun Gupta (Inactive)
              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.