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

Avoid sql_alloc() in Items

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 10.1.7
    • Component/s: OTHER
    • Labels:
      None

      Description

      sql_alloc() has additional costs compared to direct mem_root allocation:

      • function call: it is defined in a separate translation unit and can't be inlined
      • it needs to call pthread_getspecific() to get THD::mem_root

      It is called dozens of times implicitly by Items. Try to get rid of those calls.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              svoj Sergey Vojtovich
              Reporter:
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: