Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 10.1.2
    • Component/s: Plugins
    • Labels:

      Description

      This patch adds generic infrastructure for plugins to store
      things on a THD object (rather that polluting THD object with
      new member variables)

      The feature is modeled after pthread specifics hence
      the plugin shall at startup create a key, that can later be used
      by multiple thread in parallel wo/ locks (if access is made to different
      THD objects). The creation/destruction of a key is though mutex protected.
      The feature is similar to ha_data, but exists for any type of plugin.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              jonaso Jonas Oreland added a comment -

              btw, a reason for insisting on using a non THDVAR based interface.

              • some (most?) parts of mysqld are not easily pluggable
              • hence we write non-plugin code.
              • that code might want to share per-thd information to things that are implemented as plugins.

              an easy way of doing this to use the thd_key functionality, sharing only the key between the different modules (and obviously the data-definition)
              the most common way would be to add member variables to the THD...

              Maybe the THDVAR macros might be used outside of plugins too...but i'm not sure,
              and I'm not a big macro fan.

              Show
              jonaso Jonas Oreland added a comment - btw, a reason for insisting on using a non THDVAR based interface. some (most?) parts of mysqld are not easily pluggable hence we write non-plugin code. that code might want to share per-thd information to things that are implemented as plugins. an easy way of doing this to use the thd_key functionality, sharing only the key between the different modules (and obviously the data-definition) the most common way would be to add member variables to the THD... Maybe the THDVAR macros might be used outside of plugins too...but i'm not sure, and I'm not a big macro fan.
              Hide
              serg Sergei Golubchik added a comment -

              Jonas Oreland, I've just noticed that you didn't specify a license under which this contribution is available to us.
              You can either say here that we can use it under new (also called "3-clause") BSD license or submit a signed MCA.

              Show
              serg Sergei Golubchik added a comment - Jonas Oreland , I've just noticed that you didn't specify a license under which this contribution is available to us. You can either say here that we can use it under new (also called "3-clause") BSD license or submit a signed MCA .
              Hide
              jonaso Jonas Oreland added a comment -

              you can use it under new (also called "3-clause") BSD license

              /Jonas

              On Fri, Nov 28, 2014 at 1:43 PM, Sergei Golubchik (JIRA) <

              Show
              jonaso Jonas Oreland added a comment - you can use it under new (also called "3-clause") BSD license /Jonas On Fri, Nov 28, 2014 at 1:43 PM, Sergei Golubchik (JIRA) <
              Show
              serg Sergei Golubchik added a comment - http://lists.askmonty.org/pipermail/commits/2014-November/007093.html
              Hide
              jonaso Jonas Oreland added a comment -

              hi serg,

              what do you think of current patch ?

              the problem is that we use the thd variables from our vio backend,
              and if the thd variables is cleared before vio_close there is a memory leak.

              /Jonas

              Show
              jonaso Jonas Oreland added a comment - hi serg, what do you think of current patch ? the problem is that we use the thd variables from our vio backend, and if the thd variables is cleared before vio_close there is a memory leak. /Jonas

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  jonaso Jonas Oreland
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 7 hours
                    7h