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

Log warning at startup if plugin-load option is detected and plugin load list is non-empty

    XMLWordPrintable

    Details

      Description

      The plugin-load option can be somewhat dangerous to use. The documentation says the following:

      Special care must be taken when specifying the --plugin-load option multiple times, or when specifying both the --plugin-load option and the --plugin-load-add option together. The --plugin-load option resets the plugin load list, and this can cause unexpected problems if you are not aware. The --plugin-load-add option does not reset the plugin load list, so it is much safer to use.

      https://mariadb.com/kb/en/library/plugin-overview/#specifying-multiple-plugin-load-options

      This behavior can lead to confusing issues, especially when a user has multiple configuration files, and they aren't aware of the load order.

      Currently, when MariaDB encounters the plugin-load option, it just frees the list without logging anything:

      https://github.com/MariaDB/server/blob/mariadb-10.4.7/sql/mysqld.cc#L8550

      If log_warnings is set to some value (maybe 2?), and if the plugin-load list is non-empty, then I think it should log a warning like this:

      [Warning] The plugin-load option was read, and the plugin load list is non-empty. Previously loaded plugins will be removed from the plugin load list. If this is unintentional, consider using the plugin-load-add option instead.
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            GeoffMontee Geoff Montee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: