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

Add proper unlocking for MariaDB_FUNCTION_PLUGIN

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Plugins
    • None

    Description

      UNINSTALL is not safe for MariaDB_FUNCTION_PLUGIN at the moment.

      This is the relevant code:

          Create_func *builder=
            reinterpret_cast<Plugin_function*>(plugin_decl(plugin)->info)->
              create_func();
          plugin_unlock(thd, plugin);
          return builder;
      

      It immediately unlocks the plugin, so UNINSTALL can happen when the plugin functions is in use.

      We should implement proper unlocking for plugin functions.

      • The above piece of the code should not call plugin_unlock()
      • Every Item_func loaded from a plugin should:
        • decrement ref counter in destructor
        • increment ref counter in clone()

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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