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

MariaDB-devel is incomplete for plugins

    XMLWordPrintable

Details

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

    Description

      MariaDB-devel rpm package (and the corresponding deb package) are supposed to allow plugins to be built without a server. It mostly works, but there a few missing bits that need to be fixed:

      • HAVE_WSREP is defined to 1 in my_global.h while it's what the server uses, it makes server headers not usable for plugins as they start to pull in (missing) wsrep headers.
        • Suggestion:
          • remove it from the header
          • use -DWITH_WSREP=1 on the command line
      • plugin.cmake is not installed, so plugins cannot be built. Also, plugin.cmake needs install_layout.cmake and has a couple of dtrace/windows macros.
        • Suggestion:
          • combine install_layout.cmake and plugin.cmake into one file, say, mariadb-plugin-config.cmake
          • include it into MariaDB-devel
          • define a dummy dtrace macro there, unless it's already defined
          • Not sure what to do with ADD_VERSION_INFO().
          • CONFIGURE_PLUGINS() should likely not be in this new mariadb-plugin-config.cmake, it'll stay in the server
          • create an alias MARIADB_ADD_PLUGIN, because it's time
          • perhaps mariadb-plugin-config.cmake should also do

            INCLUDE_DIRECTORIES(/usr/include/mysql/server /usr/include/mysql/server/private)
            

            this is an argument that mariadb-plugin-config.cmake should be generated.

      This way a plugin can have a top-level CMakeLists.txt with

      FIND_PACKAGE(mariadb-plugin REQUIRED)
      MARIADB_ADD_PLUGIN(myplugin SOURCE my_plugin.c)
      

      and it'll just work.

      building rpm/deb packages are not part of this issue

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.