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

Replace dynamic storage engine initialisation with declarative approach

Details

    Description

      Since we introduced a few incompatible SE API changes and we'll have to bump SE API version anyway, we could try implementing this in 10.5.

      Originally plugins were intended to use declarative approach, e.g. plugin/fulltext/plugin_example.c is an example of such approach. It fills in simple_parser_descriptor and passes it via plugin descriptor to the server.

      However SE API implements dynamic approach for no apparent reason. That is server (ha_initialize_handlerton()) allocates handlerton and then passes it to a plugin for further initialisation via plugin->init() call.

      We should attempt switching it to declarative approach, which means 1. extending st_mysql_storage_engine like:

      struct st_mysql_storage_engine
      {
        int interface_version;
        handlerton *hton;
      };
      

      or even

      struct st_mysql_storage_engine: public handlerton
      {
        st_mysql_storage_engine(...): handlerton(...) {}
        int interface_version;
      };
      

      2. removing hton argument from SE plugin->init(hton)

      3. making use of plugin_decl(plugin)->info->hton rather than hton

      Attachments

        Activity

          Transition Time In Source Status Execution Times
          Sergey Vojtovich made transition -
          Open Confirmed
          126d 8h 38m 1
          Sergey Vojtovich made transition -
          Confirmed In Review
          4m 56s 1
          Sergey Vojtovich made transition -
          Stalled In Review
          24d 20h 28m 1
          Robert Bindar made transition -
          In Review Stalled
          170d 20h 22m 2
          Vicențiu Ciorbaru made transition -
          Stalled Open
          641d 17h 58m 1

          People

            cvicentiu Vicențiu Ciorbaru
            svoj Sergey Vojtovich
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.