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

Add MariaDB_FUNCTION_COLLECTION_PLUGIN

    XMLWordPrintable

Details

    Description

      A function collection plugin will provide an array of Create_item's.

      A function collection plugin data will have a structure approximately like this:

      struct st_mariadb_function_collection
      {
        int m_interface_version;
        HASH m_hash;
        const Native_func_registry *m_elements;
        size_t m_count; // The number of elements in m_elements
      };
      

      m_elements will point to a static array of Native_func_registry's, like the one defined in item_create.cc:

      static Native_func_registry func_array[] =
      {
        { { STRING_WITH_LEN("FUNC1") }, BUILDER(Create_func_func1)},
        { { STRING_WITH_LEN("FUNC2") }, BUILDER(Create_func_func2)},
        { { STRING_WITH_LEN("FUNC3") }, BUILDER(Create_func_func3)},
        { { STRING_WITH_LEN("FUNC4") }, BUILDER(Create_func_func4)},
        { { STRING_WITH_LEN("FUNC5") }, BUILDER(Create_func_func5)},
        ...
      };
      

      When initializing a function collection plugin, the server will populate m_hash.
      When de-initializing a function collection plugin, the server will free m_hash.

      Function collection plugins will allow to:

      • Split out optional SQL functions into seperate plugins (e.g. GIS, XML, INET functions)
      • Remove conditional compilation from existing server code.
      • Provide a better interface (than the existing limited UDF API), which will support:
        • character sets and collations
        • user defined data types

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              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.